fix: revert nonce

This commit is contained in:
Lakhan Samani
2022-10-20 00:14:06 +05:30
parent a68876a6f4
commit b2e0a3371f
3 changed files with 14 additions and 8 deletions

View File

@@ -39,6 +39,7 @@ export default function Root({
? searchParams.get('scope')?.toString().split(' ')
: ['openid', 'profile', 'email'];
const code = searchParams.get('code') || ''
const nonce = searchParams.get('nonce') || ''
const urlProps: Record<string, any> = {
state,
@@ -64,6 +65,10 @@ export default function Root({
params += `&code=${code}`
}
if (nonce !== '') {
params += `&nonce=${nonce}`
}
if (token.refresh_token) {
params += `&refresh_token=${token.refresh_token}`;
}