Skip to content
This repository was archived by the owner on Mar 17, 2025. It is now read-only.

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 subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant