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:
DEV_DSW
2026-06-02 17:01:43 +08:00
parent 4ef1113c2c
commit ebd7c2bf2a
2 changed files with 1 additions and 3 deletions

View File

@@ -2,7 +2,6 @@ import { request } from "../utils/request";
// 获取oauth token
export interface OauthTokenRequest {
clientId: string;
grant_type?: string;
openIdCode?: string[];
scope?: string;

View File

@@ -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)