Skip to content

OAuth Recap

Preyansh Kaushik edited this page May 9, 2020 · 1 revision

saving oauth logic for later when i get confused on what i wrote:

  • User clicks on Sign In With Google Button.
  • oauth-start route triggered on backend, which fetches auth url from Google Servers. Then redirects user to this auth-url.
  • Once user finishes auth, Google fires callback to oauth-callback with auth code
  • API calls for handshake with Google servers to exchange code for credentials and user info
  • Obtain credentials, cache in Mongo for later.
  • Redirect to /oauth-complete?email=
  • React catches this, loads OAuth Component, gets user email and passes internally to /dashboard
Clone this wiki locally