Skip to content

oauth params confusion #1338

@rosano

Description

@rosano

if (params.state) {
location = Authorize.getLocation();
Authorize.setLocation(location.href.split('#')[0]+'#'+params.state);
}
if (params.code) { // OAuth2 code or PKCE flow
fetchTokens(params.code); // remote.configure() called asynchronously
authParamsUsed = true;
}

I suspect these lines are creating an issue when I try to implement the oauth dance in my app. I'm only using remoteStorage to save app data in anonymous mode, so I thought the code and state params would be ignored by this library; not sure why these params are consumed if I have not attempted to connect any storage.

Using version 2.0.0-beta.7 consumes these params: https://remit-serve.rosano.ca/https://raw.githubusercontent.com/rosano/far/56d8ae4bf78b123f0bc26eba297a214379c738cf/index.html?code=alfa&state=bravo

Using version 1.2.3 does not: https://remit-serve.rosano.ca/https://raw.githubusercontent.com/rosano/far/f11090eb28665e5ef15792d6d26ca3671fb2fa5d/index.html?code=alfa&state=bravo

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