Skip to content

Cognito merge#92

Merged
WChunter21 merged 5 commits intomainfrom
CognitoMerge
Feb 17, 2026
Merged

Cognito merge#92
WChunter21 merged 5 commits intomainfrom
CognitoMerge

Conversation

@wyatthunter2102-wq
Copy link
Copy Markdown
Collaborator

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.

@wyatthunter2102-wq wyatthunter2102-wq self-assigned this Feb 17, 2026
@wyatthunter2102-wq
Copy link
Copy Markdown
Collaborator Author

Ready to merge

@kevbang kevbang marked this pull request as ready for review February 17, 2026 17:42
@WChunter21 WChunter21 merged commit 69a649f into main Feb 17, 2026
1 check failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants