title: Token API and Backend Google OAuth in Node and Angular
body: <p>We are transitioning from an API using cookies for state (ExpressJS sessions) to a stateless (token) API.</p>
  
  <p>We use a single PassportJS authentication strategy (GoogleStrategy). When the OAuth flow completes, Google calls back to a backend route with an access token.</p>
  
  <p>Previously, we would set a cookie at this point using req.session and redirect the user to our dashboard.</p>
  
  <p>With a token API, we generate a token based on the email (acting as a username) and access token (acting as password) when Google calls back to the backend route. </p>
  
  <p>How do we pass this token to the front-end (Angularjs) so that it can make authenticated requests?</p>
  
  <p>Do we need to switch to Google's front-end OAuth APIs?</p>