Skip to content

feat(oauth): start the provider redirect through a port #128

Description

@Bccorb

Context

OAuthProviderButtons starts the provider redirect with:

window.location.assign(data.authorizationUrl);

There is no window.location in React Native. A native client has to open the
authorization URL in an in app browser session and receive the result back through the
app's URL scheme.

Scope

  • Put the redirect behind a port, with a window.location implementation on web and an
    in app browser session (expo-web-browser) on native.
  • Handle the callback through the app scheme rather than a route in a DOM router.

Notes

The API side already supports this. resolveOAuthRedirectUri matches a requested
redirect URI exactly against the provider allowlist before falling back to origin
comparison, so a custom scheme such as myapp://oauth/callback is accepted today with no
API change, as long as it is registered on the provider.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions