okta / okta-oidc-js

okta-oidc-js
https://github.com/okta/okta-oidc-js
Other
394 stars 232 forks source link

<LoginCallback> returns "AuthSdkError: Unable to retrieve OAuth redirect params storage" #923

Closed Joyeeta closed 3 years ago

Joyeeta commented 3 years ago

I'm submitting this issue for the package(s):

I'm submitting a:

Current behavior

I am using "@okta/okta-signin-widget": "^3.8.2" and "@okta/okta-angular": "^2.0.0", which has a dependency "okta-auth-js": 3.2.4. The application was running fine until it started showing some "AuthSDKError" since 4 days ago. I have specified storage as 'localStorage' while initializing "OktaAuth" , const athClient = new OktaAuth({ url: 'XXX', redirectUri: redirectUri, responseMode: 'query', pkce: true, tokenManager: { storage: 'localStorage', expireEarlySeconds: 300 } }); While debugging,i noticed in token.js it is trying to read the okta-oauth-redirect-params from the sessionStorage rather than localStorage. I see a blank callback html, which displays the error in console: AuthSdkError: Unable to retrieve OAuth redirect params from storage.

Expected behavior

It should redirect me to my application which I should see after login.

Minimal reproduction of the problem with instructions

I have noticed it across all major browsers and operating systems. And this is happening in the latest version of "@okta/okta-angular" as well. Get the oktaAuth configured, login, and you should see this.

Extra information about the use case/user story you are trying to implement

Environment

aarongranick-okta commented 3 years ago

@Joyeeta Thanks for the submission. We have identified a flaw in okta-auth-js@3.2.4 which we are fixing now.

aarongranick-okta commented 3 years ago

@Joyeeta We have released version 3.2.5 which should correct this flaw

Joyeeta commented 3 years ago

Thanks @aarongranick-okta

hellmean commented 3 years ago

we are still experiencing this error with version 4.6.1:

Uncaught (in promise) AuthSdkError: Unable to retrieve OAuth redirect params from storage