Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
How authentication should work (in my mind)
Page / User State Logged Out Logged In
/public-page Go to /public-page Go to /public-page
/page-requiring-auth
  1. Redirect to /login
  2. After successful login redirect to /page-requiring-auth
Go to /page-requiring-auth
/login
  1. Go to /login
  2. After successful login redirect to /
Redirect to /
/logout Redirect to /
  1. Log out the user
  2. Redirect to /
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment