refactor: remove unused clientId from oauth token requests
remove clientId field from OauthTokenRequest interface and all oauthToken call sites, as it is no longer required for the API requests.
This commit is contained in:
@@ -2,7 +2,6 @@ import { request } from "../utils/request";
|
||||
|
||||
// 获取oauth token
|
||||
export interface OauthTokenRequest {
|
||||
clientId: string;
|
||||
grant_type?: string;
|
||||
openIdCode?: string[];
|
||||
scope?: string;
|
||||
|
||||
@@ -213,7 +213,6 @@ async function handlePhoneLogin() {
|
||||
|
||||
try {
|
||||
await oauthToken({
|
||||
clientId: import.meta.env.VITE_CLIENT_ID,
|
||||
scope: "server",
|
||||
mobile: phoneDigits,
|
||||
code: codeValue,
|
||||
@@ -301,7 +300,7 @@ onMounted(() => {
|
||||
// 【后续业务】:你可以将这串 idToken 通过 axios 发送给你自己的后端接口
|
||||
// 或者是直接利用第三方平台(如 Firebase / Supabase)完成纯前端鉴权
|
||||
console.log("拿到的 ID Token 是:", idToken);
|
||||
oauthToken({ clientId: import.meta.env.VITE_CLIENT_ID, openIdCode: [idToken], grant_type: 'google' })
|
||||
oauthToken({ openIdCode: [idToken], grant_type: 'google' })
|
||||
.then((res) => {
|
||||
console.log("获取到的 oauth token:", res)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user