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 + style] Sign Up + Sign In page: basic implementation w/ Supabase and styling #16

Merged
merged 6 commits into from
Oct 26, 2024

Conversation

RohinJ444
Copy link
Contributor

@RohinJ444 RohinJ444 commented Oct 26, 2024

🍞 What's new in this PR

🥐 Description

Took the basic back-end login and signup functionality I had in one login page earlier and created two new styled pages: a sign-up page (app/auth/signup/page.tsx) and a sign in page (app/auth/signin/page.tsx). I created styled components in app/auth/auth-styles.ts for both pages. The page remains centered with varying screen sizes. I saw some minor style/design changes made to Figma this afternoon and those are reflected in the implementation.

Confirmation emails need to be configured in Supabase settings, but after that, basic sign-up and sign-in functionality should be fully implemented. I describe some more features that would complete / enhance the authentication process in next steps. For now, I also added an error message at the bottom of the white card in the center of the page to make it easier to validate whether logins/signups were successful.

🥖 Screenshots

Screenshot 2024-10-25 at 11 51 04 PM Screenshot 2024-10-25 at 11 43 04 PM

🥪 How to review

Functionality

Basically everything is in the first commit with user authentication and styling. The signup page (app/auth/signup/page.tsx) takes as input an email, password, and confirmed password. It should display an error if passwords do not match or if the email is invalid. The login page (app/auth/signin/page.tsx) takes as input an email and password, and it should display an error if the login credentials are invalid. The supabase user table to track users and auth requests is linked here: https://supabase.com/dashboard/project/paifoskjfzbjbiehraqj/auth/users

Styling

Uses flexbox so it should remain centered with varying screen sizes. I believe all fonts, colors, and font sizes should match the Figma now, except for the temporary error message I added as discussed above. All the styled components I created for the page can be found in app/auth/auth-styles.ts

Testing

Because the SMTP confirmation email isn't set up yet, sign up functionality isn't quite there right now, but you can test login with the following email + password I added to the users table

Email: [email protected]
Password: vignesh

🥧 Next steps

Functionality

  • Confirmation emails do not fully work yet—this has to do with Supabase Auth settings (I currently don't have permission to change these). As a result, any users who don't have a @berkeley.edu email will get an error that confirmation email failed when attempting to sign up.
  • "Continue with Google" is a dummy button as of now, it does not provide any functionality
  • Does not yet have a "forgot password" option
  • Does not yet check whether user with specified email already exists during sign-up
  • Does not redirect anywhere after signup or signin. For now, I added a temporary message state that displays whether sign-ups and logins were successful so I could validate that supabase was actually working.

Styling

  • Small thing, but I couldn't get the drop shadow to properly render around the white card idk why 😭
  • Also small, but I don't know if I used the correct shade of blue for the hyperlinks at the bottom of each page

🥞 Relevant links

🥨 Online sources

https://styled-components.com/docs/basics#adapting-based-on-props

Referenced these PRs:
https://github.com/calblueprint/immigration-justice-project/pull/24/files
https://github.com/calblueprint/immigration-justice-project/pull/27/files

🥯 Related PRs

CC: @celinechoiii

Copy link
Collaborator

@celinechoiii celinechoiii left a comment

Choose a reason for hiding this comment

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

can you change the auth folder name to (auth)?

@@ -0,0 +1,129 @@
import styled from 'styled-components';
import COLORS from '../../styles/colors';
Copy link
Collaborator

Choose a reason for hiding this comment

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

update all imports using the alias! for example: import COLORS from '@/styles/colors';

</Card>
<SmallBuffer />
<Footer>
Already have an account? <Link href="/auth/signin">Sign in!</Link>
Copy link
Collaborator

Choose a reason for hiding this comment

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

Update to <Link href="/signin">

</Card>
<SmallBuffer />
<Footer>
Don’t have an account? <Link href="/auth/signup">Sign up!</Link>
Copy link
Collaborator

Choose a reason for hiding this comment

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

Update to <Link href="/signup">

@celinechoiii celinechoiii merged commit 811aba9 into main Oct 26, 2024
2 checks passed
celinechoiii pushed a commit that referenced this pull request Oct 28, 2024
…se and styling (#16)

* [feat + style] user authentication + styling

* eslint style fixes

* typo in text for signup page

* forgot to capitalize the 'in' in 'Sign In'

* updated imports + links + added exclamation points

* updated imports + links + added exclamation points

---------

Co-authored-by: Rohin Juneja <[email protected]>
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