okta/okta-angular

AuthSdkError: Could not load PKCE codeVerifier from storage. This may indicate the auth flow has already completed or multiple auth flows are executing concurrently.

sakpanda opened this issue · 1 comments

Describe the bug

Current behavior:
We have integrated OKTA with our angular application. After successful login from OKTA, the user redirects to the callback route of the angular application. At that point we are getting below error:

ERROR Error: Uncaught (in promise): AuthSdkError: Could not load PKCE codeVerifier from storage. This may indicate the auth flow has already completed or multiple auth flows are executing concurrently.

AuthSdkError: Could not load PKCE codeVerifier from storage. This may indicate the auth flow has already completed or multiple auth flows are executing concurrently.

at main.3f7ee475accf68cb.js:1:1059260

at Generator.next (<anonymous>)

at t (main.3f7ee475accf68cb.js:1:547141)

at J (main.3f7ee475accf68cb.js:1:547348)

at main.3f7ee475accf68cb.js:1:547410

at new t (polyfills.9eb7b3d67d9e0369.js:1:18359)

at main.3f7ee475accf68cb.js:1:547288

at I (main.3f7ee475accf68cb.js:1:1060157)

at ic (main.3f7ee475accf68cb.js:1:1059076)

at wc.run (main.3f7ee475accf68cb.js:1:1045289)

at z (polyfills.9eb7b3d67d9e0369.js:1:15971)

at polyfills.9eb7b3d67d9e0369.js:1:15061

at polyfills.9eb7b3d67d9e0369.js:1:15167

at t (main.3f7ee475accf68cb.js:1:547177)

at ne (main.3f7ee475accf68cb.js:1:547386)

at v.invoke (polyfills.9eb7b3d67d9e0369.js:1:6556)

at Object.onInvoke (main.3f7ee475accf68cb.js:1:707720)

at v.invoke (polyfills.9eb7b3d67d9e0369.js:1:6496)

at M.run (polyfills.9eb7b3d67d9e0369.js:1:1952)

at polyfills.9eb7b3d67d9e0369.js:1:16766

Expected behavior:
The authentication flow should work without any errors.

Reproduction Steps?

Launch application
Log in through Okta
After successful login redirects to /callback page

SDK Versions

"@okta/okta-angular": "6.2"
"@okta/okta-auth-js": "7.2"
"@angular/cli": "^15.2.9"
Browser: Chrome 122
OS: Windows 10

Additional Information

No response

Can you paste your OktaAuth config (please omit sensitive fields)

Are you able to repro this behavior with this sample: https://github.com/okta/samples-js-angular/tree/master/okta-hosted-login?