fix(login): login change
This commit is contained in:
@@ -7,9 +7,10 @@ import { cookies } from "next/headers"
|
||||
export const handleLoginData = async (props: {
|
||||
clientIP: string
|
||||
fingerprint: string
|
||||
data: ResultData<Login.ResLogin>
|
||||
data: Login.ResLabelLogin
|
||||
}) => {
|
||||
const { clientIP, fingerprint, data } = props
|
||||
|
||||
const sessionKey = {
|
||||
clientIP,
|
||||
fingerprint: fingerprint,
|
||||
@@ -30,9 +31,9 @@ export const handleLoginData = async (props: {
|
||||
JSON.stringify({
|
||||
clientIP,
|
||||
fingerprint: fingerprint,
|
||||
user_name: data?.message?.user_info?.user_name,
|
||||
access_token: data.message.access_token,
|
||||
refresh_token: data.message.refresh_token,
|
||||
user_name: data?.name,
|
||||
access_token: data.token,
|
||||
refresh_token: data.refresh_token,
|
||||
}),
|
||||
"EX",
|
||||
172800
|
||||
@@ -47,11 +48,9 @@ export const handleLoginData = async (props: {
|
||||
})
|
||||
return {
|
||||
...data,
|
||||
message: {
|
||||
...data.message,
|
||||
access_token: "",
|
||||
refresh_token: "",
|
||||
},
|
||||
token: "",
|
||||
access_token: "",
|
||||
refresh_token: "",
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user