Skip to content

Scope not being passed to refreshToken() in fetch wrapper #138

@spencerldixon

Description

@spencerldixon

I'm not a big js guy so please forgive me if I'm doing a fridge temperature IQ move here but...

I'm using the fetch wrapper to send POST requests from a chrome extension to an app. I can oauth between the two successfully, but when a refreshToken happens from the fetch wrapper, my backend returns a 400 bad request.

Looking into this, I noticed the difference between the two requests is that the refresh requests are missing the scope.

I saw this PR which adds an optional scope param to refreshToken (https://github.com/badgateway/oauth2-client/pull/135/files) but it doesn't look like it's been added to the fetch wrapper https://github.com/badgateway/oauth2-client/blob/main/src/fetch-wrapper.ts#L157

Am i missing something? Is there a way to ensure the scope from the client makes it through to refresh requests in the fetch wrapper?

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