fix: redirect from app
This commit is contained in:
parent
cc23784df8
commit
89f08b6d31
|
@ -38,6 +38,7 @@ export default function Root({
|
|||
const scope = searchParams.get('scope')
|
||||
? searchParams.get('scope')?.toString().split(' ')
|
||||
: ['openid', 'profile', 'email'];
|
||||
const code = searchParams.get('code') || createRandomString()
|
||||
|
||||
const urlProps: Record<string, any> = {
|
||||
state,
|
||||
|
@ -57,7 +58,7 @@ export default function Root({
|
|||
useEffect(() => {
|
||||
if (token) {
|
||||
let redirectURL = config.redirectURL || '/app';
|
||||
let params = `access_token=${token.access_token}&id_token=${token.id_token}&expires_in=${token.expires_in}&state=${globalState.state}`;
|
||||
let params = `access_token=${token.access_token}&id_token=${token.id_token}&expires_in=${token.expires_in}&state=${globalState.state}&code=`+code;
|
||||
if (token.refresh_token) {
|
||||
params += `&refresh_token=${token.refresh_token}`;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user