Skip to content

303 dev change database and cognito to use email to login#321

Open
prooflesben wants to merge 14 commits intomainfrom
303-dev---change-database-and-cognito-to-use-email-to-login
Open

303 dev change database and cognito to use email to login#321
prooflesben wants to merge 14 commits intomainfrom
303-dev---change-database-and-cognito-to-use-email-to-login

Conversation

@prooflesben
Copy link
Collaborator

@prooflesben prooflesben commented Feb 17, 2026

ℹ️ Issue

Closes

📝 Description

This ticket is basically the migration from away from using the username in our app. I tried to get it all in one go but most likely I will miss things so I pls urge you to look through the files changed and if you see somewhere that uses the user Id especially in the front end pls request changes. In this pr I also updated our user object to include the newly agreed upon fields of firstName, lastName, and profilePicUrl. The profile pic url is optional since we don't require it upon sign up. I have code to upload a profile pic but that will be a seperate pr since this is already hefty. PLS PLS PLS PLS PLS review this pr fr fr.

Briefly list the changes made to the code:

  1. Changed backend so it logs in with email instead of username
  2. Created new aws cognito user pool and dynamo db user table.
  3. Reconfigured register so it works with email instead of userId
  4. Added refresh and token id to cookies when logging.
  5. Changed all references to user id to email since that is the key
  6. Changed dynamo db database to look up things using the email since that is the database key now
  7. Changed all references to userId key in dynamo db lookups to email
  8. Changed notification lookups by userId to userEmail
  9. Changed Notification object to use userEmail instead of userId.
  10. Changed user object to have optional profile pic url and to delete userId and firstName and lastName
  11. Changed backend test to pass.
  12. Merged camilas pr with this so we can use her email login.
  13. Migrated amazon cognito users and dynamo db database.
  14. Changed .env variables for cognito and dynamo db user table name.

✔️ Verification

A whole lot of manual testing
Provide screenshots of any new components, styling changes, or pages.

Test Changes

If your new feature required some test to be changed or added to fit the new functionality or changes please document these changes here.

🏕️ (Optional) Future Work / Notes

Didn't change references to user id in the user page related components due to a incoming redesign

Copy link
Contributor

@janekamata janekamata left a comment

Choose a reason for hiding this comment

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

After doing some testing everything seems to be working once the Register change is implemented. We might find some more bugs when it comes to frontend Users page once that work is started

The only issue I found

  • NotificationPopup.tsx, line 35 references userId

I think you've already fixed the below but noting for documentation here:

  • Register has improper username const
  • authContext.tsx has numerous username references that should be updated

@prooflesben
Copy link
Collaborator Author

After doing some testing everything seems to be working once the Register change is implemented. We might find some more bugs when it comes to frontend Users page once that work is started

The only issue I found

  • NotificationPopup.tsx, line 35 references userId

I think you've already fixed the below but noting for documentation here:

  • Register has improper username const
  • authContext.tsx has numerous username references that should be updated

All of these should be fixed

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.

DEV - Change database and cognito to use email to login

3 participants