KenjiPcx / Microsoft-Imagine-Cup-2024-FeynmanLearn

https://delightful-beach-0f72d6303.4.azurestaticapps.net/
MIT License
1 stars 0 forks source link

[MVP] Auth system #5

Closed KenjiPcx closed 9 months ago

KenjiPcx commented 10 months ago

Context

To get user data, we kinda need a auth system, Azure provides this. We will be hosting our app through Azure Static Web apps (React + Azure functions backend), we just need to use the provided auth system there https://learn.microsoft.com/en-us/azure/static-web-apps/authentication-authorization

Once we get the user data, we can access the user page

Requirement

Tasks

KenjiPcx commented 9 months ago

We will just use auth routes from TanStack router We wrap all routes with the auth route except the main menu https://tanstack.com/router/v1/docs/framework/react/guide/authenticated-routes

When a user clicks on any of the routes and is not logged in, it will redirect to the login page from GitHub / Microsoft https://learn.microsoft.com/en-us/azure/static-web-apps/authentication-authorization