oauth login not need uuid. if has uuid, peer will be created by uuid
This commit is contained in:
+5
-5
@@ -3,7 +3,7 @@ import { current, login } from '@/api/user'
|
||||
import { setToken, removeToken, setCode, removeCode } from '@/utils/auth'
|
||||
import { useRouteStore } from '@/store/router'
|
||||
import { useAppStore } from '@/store/app'
|
||||
import { oidcAuth, oidcQuery } from '@/api/login';
|
||||
import { oidcAuth, oidcQuery } from '@/api/login'
|
||||
|
||||
export const useUserStore = defineStore({
|
||||
id: 'user',
|
||||
@@ -75,8 +75,8 @@ export const useUserStore = defineStore({
|
||||
},
|
||||
id: `${platform}-${browser}`,
|
||||
op: provider, // 传入的 provider
|
||||
uuid: crypto.randomUUID(), // 自动生成 UUID
|
||||
};
|
||||
uuid: '',//crypto.randomUUID(), // 自动生成 UUID
|
||||
}
|
||||
const res = await oidcAuth(data).catch(_ => false)
|
||||
if (res) {
|
||||
const { code, url } = res.data
|
||||
@@ -89,7 +89,7 @@ export const useUserStore = defineStore({
|
||||
}
|
||||
},
|
||||
async query (code) {
|
||||
const params = { "code": code, "uuid": crypto.randomUUID(), "Id": "999" }
|
||||
const params = { 'code': code, uuid: '' }
|
||||
const res = await oidcQuery(params).catch(_ => false)
|
||||
if (res) {
|
||||
removeCode()
|
||||
@@ -99,7 +99,7 @@ export const useUserStore = defineStore({
|
||||
return userData
|
||||
}
|
||||
return false
|
||||
}
|
||||
},
|
||||
},
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user