Skip to content

Commit 89f08b6

Browse files
committed
fix: redirect from app
1 parent cc23784 commit 89f08b6

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

app/src/Root.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ export default function Root({
3838
const scope = searchParams.get('scope')
3939
? searchParams.get('scope')?.toString().split(' ')
4040
: ['openid', 'profile', 'email'];
41+
const code = searchParams.get('code') || createRandomString()
4142

4243
const urlProps: Record<string, any> = {
4344
state,
@@ -57,7 +58,7 @@ export default function Root({
5758
useEffect(() => {
5859
if (token) {
5960
let redirectURL = config.redirectURL || '/app';
60-
let params = `access_token=${token.access_token}&id_token=${token.id_token}&expires_in=${token.expires_in}&state=${globalState.state}`;
61+
let params = `access_token=${token.access_token}&id_token=${token.id_token}&expires_in=${token.expires_in}&state=${globalState.state}&code=`+code;
6162
if (token.refresh_token) {
6263
params += `&refresh_token=${token.refresh_token}`;
6364
}

0 commit comments

Comments
 (0)