Skip to content

Conversation

@Juwang110
Copy link

@Juwang110 Juwang110 commented Mar 20, 2025

ℹ️ Issue

Enables authentication support for most routes

📝 Description

I added an authentication form with amplify which connects to our AWS cognito setup. This form is present if a user tries to access any route besides the pantry application route. The form features sign up and sign in functionality as well as a button to navigate to the pantry application route and a button to log donation for one time user (no functionality currently). I also added a sign out button component so it is possible to sign out. These changes are important because they protect our application from unverified users.

Briefly list the changes made to the code:

  1. Added authentication requirements for all routes (except pantry application)
  2. Authentication form buttons to navigate to pantry application route and log donation for one time user (no functionality currently)
  3. Sign out button component

✔️ Verification

I navigated to each route to make sure it was protected by authentication. I also tested the manually added form buttons to make sure they navigated correctly. For the form itself, I tried signing in without signing up and I also tested proper behavior by making an account then signing in. I verified that I stayed signed in between routes until I clicked sign out by adding the sign out button to the landing page.

image

🏕️ (Optional) Future Work / Notes

I created a sign out button component that can be used to sign out.

Copy link

@fanzzz368 fanzzz368 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm!

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