Skip to main content
important

This is a contributors guide and NOT a user guide. Please visit these docs if you are using or evaluating SuperTokens.

Redirect to the standard login route if required

Status

This is just a proposal so far, it hasn't been accepted and needs further discussion.

Status:
proposed
Deciders:
rishabhpoddar, porcellus
Proposed by:
porcellus
Created:
2023-05-11

Context and Problem Statement#

When the user redirected to the app during the OAuth2 sign-in process, there are a few routes we can choose to provide.

Considered Options#

  • Merge functionality into existing auth page
  • Add new route for OAuth2 specific authentication that embeds the sign in/up components
  • Add new route that redirects to default auth page

Decision Outcome#

Chosen option: Add new route that redirects to default auth page

  • Nicely separates responsibilities

The auth page will redirect to this page after the sign-in is completed and then this route will redirect the user back to the client app.

Pros and Cons of the Options#

Merge functionality into existing auth page#

  • No redirection/navigation
  • Erodes the separation of recipes
  • Complicates implementation/testing
  • Add new route for OAuth2 specific authentication that embeds the sign-in/up components#

  • No redirection/navigation
  • Duplicates functionality
  • Add new route that redirects to default auth page#

  • Nicely separates responsibilities
  • Requires redirection