Skip to content

Conversation

@mehanana
Copy link
Contributor

ℹ️ Issue

Closes #107

📝 Description

Write a short summary of what you added. Why is it important? Any member of C4C should be able to read this and understand your contribution -- not just your team members.

Added authentication to the users lambda route to protect it from anyone accessing the endpoints.

Briefly list the changes made to the code:

  1. Created an auth.ts file to retrieve tokens and verify through cognito, and then determine if the user is an admin or not
  2. Updated each endpoint in handler.ts to check authorization of the user before running the business logic
  3. Updated both test files to mock authorization to ensure the endpoints will work.

✔️ Verification

What steps did you take to verify your changes work? These should be clear enough for someone to be able to clone the branch and follow the steps themselves.

Provide screenshots of any new components, styling changes, or pages.

Tests ran after authorization was added:
Screenshot 2026-02-11 170500
Screenshot 2026-02-11 170651

🏕️ (Optional) Future Work / Notes

Did you notice anything ugly during the course of this ticket? Any bugs, design challenges, or unexpected behavior? Write it down so we can clean it up in a future ticket!

@github-actions github-actions bot requested a review from bhuvanh66 February 11, 2026 22:08
github-actions bot added a commit that referenced this pull request Feb 11, 2026
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.

Add Authentication Check to Users Routes

1 participant