AuthSdkError: Unable to parse a token from the url (okta sdk)

I’m using angular sdk.

Sometimes, when i want to login,
I’m redirect to extrenal login form (to the tonent login form ) => OK
Then i’m redirected to /implicit/callback + code in params
Then to the implicit/callback there is the message :
“AuthSdkError: Unable to parse a token from the url” (but sometimes all is all right)

Is it a bug ?

Hi @nlas

Sounds like a race condition or duplicate requests sent to Okta (this can happen due to network issues). When this error occurs, what does the browser console register?

the browser console register nothing :
i had upgraded to @okta/okta-angular : ^2.0.0 + @okta/okta-auth-js: ^3.0.0

before this upgrade, the error console were “AuthSdkError: Unable to retrieve OAuth redirect params cookie” but since the upgrade, this message is not displayed in console yet, but it’s displayed like a message (@okt-auth-js/lib/token.js line 747)
it’s like there is no “okta-oauth-redirect-params” in cookies

redirectUri should be the same given while adding the app in developer.okta.com