clevercanary / hca-atlas-tracker

Apache License 2.0
0 stars 0 forks source link

Implement NextAuth for Google and Microsoft #395

Open NoopDog opened 2 months ago

NoopDog commented 2 months ago

Need

Our current authentication solution has a few problems:

  1. We only currently support Google as an authentication provider. However, many of the email addresses that users send to us are Microsoft-backed.
  2. It's easy to accidentally log out by refreshing the page.
  3. When opening a new tab, the new tab is opened in logged-out mode.

Approach

  1. Implement NextAuth.js instead of Google Auth using the Google package directly.
  2. Do this in the application instead of the package for now.
  3. The NextAuth will set a secure HTTP cookie from the server that functions as the session cookie rather than only keeping the token in JS memory.
NoopDog commented 1 month ago

Complete