Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Code flow breaks due to redirect #1414

Open
Mangar2 opened this issue Jun 7, 2024 · 0 comments
Open

Code flow breaks due to redirect #1414

Mangar2 opened this issue Jun 7, 2024 · 0 comments

Comments

@Mangar2
Copy link

Mangar2 commented Jun 7, 2024

Hi,

not really a bug, more a possibility to make your code more robust. Still found some internet q&a reporting the same poblem without solution.

Steps 1-4 of "code" flow worked fine until authority sent the code. "loadDiscoveryDocumentAndTryLogin" was not able to extract the code due to a redirect that happend by async processes in parallel to the loadDiscoveryAndTryLogin process.

(authGuards on all pages made the router redirecting and logically window.location.search was empty when loadDiscoveryDocumentAndTryLogin accessed it).

My suggestion: save the window.location.search content as soon as possible in loadDiscoveryAndTryLogin to prevent other async-task to clear it. It is hard to debug, if it happens.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant