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

[feat] refines the auth flows #76

Merged
merged 22 commits into from
May 19, 2024
Merged

Conversation

pragyakallanagoudar
Copy link
Collaborator

@pragyakallanagoudar pragyakallanagoudar commented Apr 12, 2024

🎋 Description

🌴 What's new in this PR

This PR:

  • adds a confirm password input for the signup flow
  • provides feedback to the user when they attempt to sign up with an email that is already registered
  • adds "new password is not the same as old password" requirement to the reset password PasswordComplexity

🌲 Screenshots

(1) password in confirm password input does not match the original
passwords do not match

(2) email for the account already exists
email already exists

(3) new password is not the same as old password (working on screenshot 🔨)

🌳 How to review

  1. Try to sign up for a new account with an email that already exists, and make sure it errors.
  2. Try to sign up for a new account with an email that isn't attached to an existing account. Make the confirm password different from the password input, and make sure it errors.
  3. Try to reset your password for an account and enter in the existing password again as the new password. Make sure it errors.

🌱 Next steps

  1. Did not add the feature that checks if an account with the email exists for the forgot password page. This is non-trivial because we can't access all the emails in the auth table, so will need to do more digging on this!
  2. For the Log In flow, both the email and password text inputs have error messages that are currently not supported ("Email not found" and "Password is incorrect"). It may be useful to add implement a fix for these messages to be displayed in a future sprint. Note: While these messages are not displayed given this has not been implemented, there is a general error message ("Something went wrong. Please try again.") displayed near the top of the card.

🔗 Relevant Links

ℹ️ Online sources

https://github.com/orgs/supabase/discussions/1282#discussioncomment-5230475

🪴 Related PRs

CC: @varortz

Copy link

linear bot commented Apr 12, 2024

@pragyakallanagoudar pragyakallanagoudar marked this pull request as draft April 12, 2024 03:03
@varortz varortz self-requested a review April 14, 2024 08:31
@pragyakallanagoudar pragyakallanagoudar changed the title [DRAFT] refine the auth flows refines the auth flows Apr 14, 2024
@pragyakallanagoudar pragyakallanagoudar changed the title refines the auth flows [feat] refines the auth flows Apr 14, 2024
@pragyakallanagoudar pragyakallanagoudar marked this pull request as ready for review April 14, 2024 23:03
@pragyakallanagoudar pragyakallanagoudar marked this pull request as draft April 15, 2024 00:11
@pragyakallanagoudar pragyakallanagoudar changed the title [feat] refines the auth flows [DRAFT] [feat] refines the auth flows Apr 15, 2024
@pragyakallanagoudar pragyakallanagoudar changed the title [DRAFT] [feat] refines the auth flows [feat] refines the auth flows Apr 21, 2024
@pragyakallanagoudar pragyakallanagoudar marked this pull request as ready for review April 21, 2024 20:48
src/app/(auth)/forgot-password/page.tsx Outdated Show resolved Hide resolved
src/app/(auth)/forgot-password/page.tsx Outdated Show resolved Hide resolved
src/app/(auth)/reset-password/page.tsx Outdated Show resolved Hide resolved
src/components/PasswordComplexity.tsx Outdated Show resolved Hide resolved
@pragyakallanagoudar pragyakallanagoudar force-pushed the pragya/ijp-102-refine-the-auth-flows branch 2 times, most recently from da9a056 to 5a73558 Compare May 1, 2024 20:50
src/app/(auth)/forgot-password/page.tsx Outdated Show resolved Hide resolved
src/app/(auth)/email-verified/page.tsx Outdated Show resolved Hide resolved
src/app/(auth)/forgot-password/page.tsx Outdated Show resolved Hide resolved
src/app/(auth)/forgot-password/page.tsx Outdated Show resolved Hide resolved
src/app/(auth)/reset-password/page.tsx Show resolved Hide resolved
src/app/(auth)/signup/page.tsx Outdated Show resolved Hide resolved
src/app/(auth)/signup/page.tsx Outdated Show resolved Hide resolved
src/components/PasswordComplexity.tsx Outdated Show resolved Hide resolved
src/utils/AuthProvider.tsx Outdated Show resolved Hide resolved
src/utils/AuthProvider.tsx Outdated Show resolved Hide resolved
src/utils/AuthProvider.tsx Outdated Show resolved Hide resolved
src/utils/AuthProvider.tsx Outdated Show resolved Hide resolved
src/utils/AuthProvider.tsx Outdated Show resolved Hide resolved
@pragyakallanagoudar pragyakallanagoudar force-pushed the pragya/ijp-102-refine-the-auth-flows branch from a36d7aa to 1b3a596 Compare May 14, 2024 02:57
src/app/(auth)/forgot-password/page.tsx Outdated Show resolved Hide resolved
src/app/(auth)/login/page.tsx Outdated Show resolved Hide resolved
src/app/(auth)/signup/page.tsx Outdated Show resolved Hide resolved
src/utils/AuthProvider.tsx Outdated Show resolved Hide resolved
src/utils/AuthProvider.tsx Outdated Show resolved Hide resolved
@pragyakallanagoudar pragyakallanagoudar force-pushed the pragya/ijp-102-refine-the-auth-flows branch from 94888fe to aee6072 Compare May 18, 2024 07:30
src/utils/AuthProvider.tsx Outdated Show resolved Hide resolved
src/utils/AuthProvider.tsx Outdated Show resolved Hide resolved
Copy link
Contributor

@jinkang-0 jinkang-0 left a comment

Choose a reason for hiding this comment

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

looks good pragya! i just had some minor nits, but otherwise everything looks great - major improvement to the auth flows!

Comment on lines 44 to 45
setEmailError(validEmail(email) ? '' : 'Email not found.');
setPasswordError(password !== '' ? '' : 'Password is incorrect.');
Copy link
Collaborator

Choose a reason for hiding this comment

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

Could we also get rid of the periods for these error messages?

Copy link
Collaborator

Choose a reason for hiding this comment

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

OH also, are you still down to implement these error checks like we had mentioned the other day?

Copy link
Collaborator

@varortz varortz left a comment

Choose a reason for hiding this comment

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

LOOKS AMAZING PRAGYA! THANKS FOR ENHANCING THE AUTH FLOWS :))

@varortz varortz merged commit eed1657 into main May 19, 2024
2 checks passed
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