steelesh / UCollab

IT SR Capstone project
https://steelesh.github.io/UCollab/
0 stars 0 forks source link

implement azure ad auth, create dynamic navbar, route protection, populate db models #43

Closed steelesh closed 2 weeks ago

steelesh commented 3 weeks ago

features:

authentication flow:

  1. user clicks "sign in with uc credentials"
  2. redirected to microsoft login
  3. upon successful login, nextauth:
    • gets user data from azure ad
    • creates/updates local user record
    • creates jwt session with user details
    • redirects back to application
  4. session is maintained via jwt token
  5. protected routes validate jwt through middleware
  6. session data can be accessed in two ways:
    • client-side: usesession() hook for reactive components
    • server-side: getserversideprops to fetch session before page load

allows for: