冯诚 2 years ago
parent
commit
5efc45d746
1 changed files with 5 additions and 2 deletions
  1. 5 2
      src/utils/third-login.ts

+ 5 - 2
src/utils/third-login.ts

@@ -54,8 +54,11 @@ window.addEventListener('load', () => {
   google.accounts.id.initialize({
     client_id:
       '393349837160-3opoqoo9l0gk9uimu212gp9uvm72406m.apps.googleusercontent.com',
-    login_uri: import.meta.env.VITE_ORIGIN + '/api/user/google/callback',
-    ux_mode: 'redirect',
+    // login_uri: import.meta.env.VITE_ORIGIN + '/api/user/google/callback',
+    // ux_mode: 'redirect',
+    callback() {
+      location.href = '/api/user/google/callback'
+    },
   })
   gTask.done()
 })