After login into the application from Okta, and entering the application home page, immediately when the user clicks on the browser back button getting an Okta error like
“AuthSdkError: Could not load PKCE codeVerifier from storage. This may indicate the auth flow has already been completed or multiple auth flows are executing concurrently”. But In real cases, it should navigate back to the login page.
The browser URL is showing like a callback component URL, but OKTA provides this by default callback component.
So how can I handle this scenario as the usual browser back button process?
We do have some historical discussion on this issue that may be worth reviewing as potential solutions to prevent this error depending on the cause (which in this case is hitting that back button):
That error occurs because the PKCE codeVerifier isn’t written to the localStorage location expected. This can happen for a few different reasons – multiple instances of authjs on the page, multiple browser redirects, the same app is open in multiple tabs, etc. Are you using the default storageManager configuration?