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

Bad side effect in isReturningFromAuthServer() #38

@jacksonthall22

Description

@jacksonthall22

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions