Closed andimarc closed 1 month ago
The user must first create the necessary GitHub OAuth app and/or Google OAuth Client ID with the redirect URIs set to http://localhost:4280/.auth/login/github and http://localhost:4280/.auth/login/google respectively.
They must then add the "auth" configuration in their staticwebapp.config.json file and set the appropriate environment variables containing client ID and client secret values before running starting the SWA CLI.
User clicks on "Log in with GitHub" link (http://localhost:4280/.auth/login/github), which redirects to https://github.com/login/oauth/authorize.
User logs into GitHub if not already logged in.
User authorizes GitHub OAuth app if not already authorized for their account.
User is redirected back to the static web app.
User clicks on "Log in with Google" link (http://localhost:4280/.auth/login/google), which redirects to https://accounts.google.com/o/oauth2/v2/auth.
User logs into Google if not already logged in.
User authorizes Google OAuth app if not already authorized for their account.
Setup
The user must first create the necessary GitHub OAuth app and/or Google OAuth Client ID with the redirect URIs set to http://localhost:4280/.auth/login/github and http://localhost:4280/.auth/login/google respectively.
They must then add the "auth" configuration in their staticwebapp.config.json file and set the appropriate environment variables containing client ID and client secret values before running starting the SWA CLI.
GitHub Login
User clicks on "Log in with GitHub" link (http://localhost:4280/.auth/login/github), which redirects to https://github.com/login/oauth/authorize.
User logs into GitHub if not already logged in.
User authorizes GitHub OAuth app if not already authorized for their account.
User is redirected back to the static web app.
Google Login
User clicks on "Log in with Google" link (http://localhost:4280/.auth/login/google), which redirects to https://accounts.google.com/o/oauth2/v2/auth.
User logs into Google if not already logged in.
User authorizes Google OAuth app if not already authorized for their account.
User is redirected back to the static web app.