Repository navigation
MSPCA 55: Sign-in flow - #38
Merged
Merged
Conversation
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
…frontend-endpoint' into ps/mspca-55-sign-in
dburkhart07
requested changes
Nov 19, 2026
dburkhart07
left a comment
Collaborator
There was a problem hiding this comment.
really good initial pass through. such a well structured PR, a lot of very small nits. core logic looks so good though. nice job polina!!! 🐼 🐈⬛
dburkhart07
requested changes
Nov 19, 2026
dburkhart07
left a comment
Collaborator
There was a problem hiding this comment.
2 small documentation requests
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…frontend-endpoint' into ps/mspca-55-sign-in # Conflicts: # apps/frontend/src/components/Navbar.tsx # apps/frontend/src/components/modals/AnimalModal.tsx # apps/frontend/src/utils/useVolunteerId.spec.tsx # apps/frontend/src/utils/volunteer.ts
… a warning, test cleanup
shreeyaadhikari
requested changes
Nov 22, 2026
shreeyaadhikari
left a comment
There was a problem hiding this comment.
this is so clean polina <3 !! just a couple nits
Base automatically changed from
pk/mspca-46-animal-availability-frontend-endpoint
to
main
November 22, 2026 19:33
# Conflicts: # apps/frontend/src/api/apiClient.ts # apps/frontend/src/app.tsx # apps/frontend/src/components/Navbar.tsx # apps/frontend/src/components/modals/AnimalModal.tsx # apps/frontend/src/routes.ts # apps/frontend/src/types.ts # apps/frontend/src/utils/volunteer.spec.ts # apps/frontend/src/utils/volunteer.ts
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.
ℹ️ Issue
Closes MSPCA-55
Stacked on #30 (MSPCA-46), where MSPCA-51 was merged. Once #30 merges, the base switches to
main.📝 Description
Adds email/password sign-in with Cognito. Pages now use the signed-in user instead of the
?volunteerId=query param.Backend
CognitoJWTGuard, so all non-@Public()routes now require a valid access token. Un-skipped its testsfindByCognitoSubOrFailto the volunteer, coordinator and owner servicesAuthModulewithGET /api/auth/me. It reads the token payload withcognitoService.getUser(req), uses the user's Cognito group to pick the right service, and returns{ role, user }Frontend
getMe()toapiClient(thefetchAuthSessioninterceptor was already on the base branch)UserProvider/useCurrentUser(), following the SSF example, to load the signed-in user from/meRequireAuth, which sends signed-out users to/sign-in. Replaced Amplify's built-in<Authenticator>formAnimalModaluses the signed-in volunteer's ID. RemoveduseVolunteerIdandparseVolunteerIdImportant Notes
AUTH_DISABLED=false, and the frontend needsVITE_COGNITO_USER_POOL_IDandVITE_COGNITO_USER_POOL_CLIENT_ID(same values as the backend'sCOGNITO_ones). Confirming new accounts needsAWS_ACCESS_KEY_ID/AWS_SECRET_ACCESS_KEY. Postman requests to protected routes now need a bearer token@mspca.orgcheck inCreateCoordinatorDtolocally. That change isn't in this PRsignIn'snextStepis left for a future ticket (TODO inhandleSubmit)✔️ Verification
Backend (
npx jest), frontend (npx vitest run --root apps/frontend), lint, and typecheck all pass for both apps.Sign-in page (desktop and mobile)

A failed login displays an error

Volunteer: initials in the Navbar, and


/mereturning their record (TV for Test Volunteer)Coordinator: initials in the Navbar, and


/mereturning their record (TC for Test Coordinator)Apply is disabled for coordinators

Also checked: reloading keeps you signed in, signed-out visits redirect to
/sign-inand return you to that page after signing in, and/api/auth/mewithout a token returns401🏕️ (Optional) Future Work / Notes