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

Bad side effect in isReturningFromAuthServer() #38

Open
jacksonthall22 opened this issue Jan 10, 2025 · 0 comments
Open

Bad side effect in isReturningFromAuthServer() #38

jacksonthall22 opened this issue Jan 10, 2025 · 0 comments

Comments

@jacksonthall22
Copy link

Multiple calls to isReturningFromAuthServer() while the code and state params are still in the URL will cause state.hasAuthCodeBeenExchangedForAccessToken to be set to false even when it really has already been exchanged, which could cause other methods like getAccessToken() (which I would otherwise expect to be idempotent) to call exchangeAuthCodeForAccessToken() multiple times, throwing (in my case) a 400 error from the fetch call to the third party endpoint when it sees that I'm trying to use the same code a second time.

It took me so long to track down why so just trying to save others the headache.

Are there any maintenance plans for this library in the future?

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