feat(login): switch login to google oauth flow
- add typed OauthTokenRequest interface for oauth token API - remove unused AgreePopup component and all agreement-related logic - rewrite login page to implement full Google OAuth2 login flow including state generation, callback validation and redirect handling
This commit is contained in:
@@ -1,7 +1,15 @@
|
||||
import { request } from "../utils/request";
|
||||
|
||||
// 获取oauth token
|
||||
export function oauthToken(args: any) {
|
||||
export interface OauthTokenRequest {
|
||||
clientId: string;
|
||||
grant_type?: string;
|
||||
openIdCode?: string[];
|
||||
scope?: string;
|
||||
[property: string]: any;
|
||||
}
|
||||
|
||||
export function oauthToken(args: OauthTokenRequest) {
|
||||
return request({
|
||||
url: "/auth/oauth2/token",
|
||||
method: "post",
|
||||
|
||||
Reference in New Issue
Block a user