Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[auth] Implement login via username #35

Merged
merged 31 commits into from
Nov 28, 2023
Merged

[auth] Implement login via username #35

merged 31 commits into from
Nov 28, 2023

Conversation

adityapawar1
Copy link
Collaborator

@adityapawar1 adityapawar1 commented Nov 6, 2023

What's new in this PR

  • Changes the signup screen to include username, first name, last name, email, and password with input validation for username and email.
  • Uses a database trigger to add user metadata to the profiles table
  • Adds some basic styling to the sign up and log in page

Relevant Links

https://supabase.com/docs/guides/database/postgres/triggers
https://github.com/orgs/supabase/discussions/8383

Notion Sprint Task

Sprint task

Online sources

Related PRs

How to review

  • Go to the sign up page
    • Try entering an invalid username and an already taken username to make sure both throw an error.
    • Enter an invalid email to make sure an error is shown on the screen
    • Create a new account and continue with the onboarding process
  • Log out, and try logging in again with your new account
  • Log out, try entering a username that does not exist
  • Try entering a username that does exist with a wrong password

Next steps

None

Tests Performed, Edge Cases

See "How to Review"

Screenshots

IMG_3088

@akshaynthakur

@adityapawar1 adityapawar1 marked this pull request as draft November 6, 2023 02:50
@adityapawar1 adityapawar1 marked this pull request as draft November 6, 2023 02:50
@adityapawar1 adityapawar1 marked this pull request as draft November 6, 2023 02:50
@adityapawar1 adityapawar1 marked this pull request as ready for review November 7, 2023 23:03
@akshaynthakur akshaynthakur self-requested a review November 8, 2023 00:53
Copy link
Collaborator

@akshaynthakur akshaynthakur left a comment

Choose a reason for hiding this comment

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

Great work! My comments are mainly styling nits (styling wasn't originally in scope but I'm excited to see you doing it!)

Outstanding items:

  • Ensure that sign up can only happen if account doesn't already exist for email
  • Double check that usernames are being added to the profiles table when new users sign up

src/app/auth/login.tsx Outdated Show resolved Hide resolved
src/app/auth/login.tsx Outdated Show resolved Hide resolved
src/app/auth/login.tsx Outdated Show resolved Hide resolved
src/app/auth/login.tsx Outdated Show resolved Hide resolved
src/app/auth/login.tsx Show resolved Hide resolved
src/app/auth/signup.tsx Outdated Show resolved Hide resolved
src/app/auth/signup.tsx Outdated Show resolved Hide resolved
src/app/auth/signup.tsx Outdated Show resolved Hide resolved
src/app/auth/signup.tsx Outdated Show resolved Hide resolved
src/app/auth/signup.tsx Outdated Show resolved Hide resolved
@adityapawar1
Copy link
Collaborator Author

adityapawar1 commented Nov 15, 2023

I finished the rest of the review changes but I needed some help moving the login/sign up button to the bottom of the page and toggling seeing the password. @akshaynthakur

@akshaynthakur akshaynthakur self-requested a review November 21, 2023 05:03
Copy link
Collaborator

@akshaynthakur akshaynthakur left a comment

Choose a reason for hiding this comment

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

Good work on the styling! Lot of small nits to fix, but overall things are looking nice.

src/app/auth/login.tsx Outdated Show resolved Hide resolved
src/app/auth/login.tsx Outdated Show resolved Hide resolved
src/app/auth/login.tsx Show resolved Hide resolved
src/app/auth/login.tsx Outdated Show resolved Hide resolved
src/app/auth/login.tsx Outdated Show resolved Hide resolved
src/components/StyledButton.tsx Outdated Show resolved Hide resolved
src/components/StyledButton.tsx Outdated Show resolved Hide resolved
src/components/StyledButton.tsx Outdated Show resolved Hide resolved
src/components/UserStringInput.tsx Outdated Show resolved Hide resolved
src/components/UserStringInput.tsx Outdated Show resolved Hide resolved
Copy link
Collaborator

@akshaynthakur akshaynthakur left a comment

Choose a reason for hiding this comment

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

Great work! Couple small changes and this should be ready to merge!

Also, just checked with Brenda and she said that the text inputs on the sign up screen should also have labels above them, she just forgot to update the designs. Make sure to update those inputs!

src/components/UserStringInput/styles.tsx Show resolved Hide resolved
src/app/auth/login.tsx Show resolved Hide resolved
src/app/auth/signup.tsx Show resolved Hide resolved
src/app/auth/signup.tsx Show resolved Hide resolved
@adityapawar1
Copy link
Collaborator Author

I think merging this also lets us merge #42 ?

Copy link
Collaborator

@akshaynthakur akshaynthakur left a comment

Choose a reason for hiding this comment

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

INCREDIBLE job on this massive PR! Big congrats on it finally being merged

@akshaynthakur akshaynthakur merged commit 0e62caf into main Nov 28, 2023
2 checks passed
@akshaynthakur akshaynthakur deleted the adi/username-login branch November 28, 2023 03:58
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.

2 participants