Merged
Conversation
kevbang
approved these changes
Feb 14, 2026
Collaborator
Author
|
Ready to merge |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Cognito Authentication + Location-Based Refactor
Summary
This PR integrates AWS Cognito authentication and finalizes our location-scoped multi-tenant structure.
The app now:
Uses Cognito for login/logout
Hydrates DB user after login
Persists active location
Scopes data to selected location
Implements invite-based onboarding
Authentication:
Cognito Integration:
Replaced legacy login logic
Added PostLogin bootstrap page
Hydrates user + accessible locations
Redirects based on role and access
Invite Flow:
Admin/Manager can invite a user for a specific location
Token-based activation link:/account/setup?token=...
Invitee sets password and activates account
Redirects to login after activation
Location State:
Implemented centralized LocationState service:
Stores accessible locations
Persists active location in localStorage
Triggers refresh on location change
Pages subscribe to OnChange
Location-Scoped Data:
Implemented pattern (same as RecipeList):
RecipeList loads by active location
Page refreshes automatically when location changes
UI / Layout Updates:
Updated layouts for public vs authenticated views
Added Location selector
Updated Profile dropdown + logout
Role-based navigation
No-access handling
Major Areas Touched
Services:
LocationState
UserContextService
CognitoProvisioningService
AuthService
UserService
Routing / Layout:
App
Routes
MainLayout
NavMenu
PublicLayout
Pages:
SignIn
PostLogin
InviteSignUp
AccountSetup
RecipeList
UserList
Settings pages
Admin / Manager views
Security Note:
No secrets committed.
Cognito credentials and DB credentials are stored via environment variables or local secrets.