add school domains as part of environment variables
add email validation function under src/common/functions
add email checking in zod email validation on client and server side
add redirection to verify page after sign up is complete, and before email is verified
display error message if registered user tries to register again
Implementation
We have decided to use a single string to represent the school's email domain rather than an array. Our research indicates that the domain name after the '@' symbol in email addresses remains consistent, regardless of any prefixes. See SMU example.
If registered user try to sign up again, supabase api will throw an error, which is caught by the program and error message will be displayed (see supabase create user api)
Testing
To set up the project locally for testing, follow the following steps:
Install dependencies
yarn install
Run the development server
yarn dev
Head over to user sign up page
Fill in valid school emails and password
If account creation is successful, you should be redirected to email verification page
closes #11
Changes
src/common/functions
verify
page after sign up is complete, and before email is verifiedImplementation
Testing
To set up the project locally for testing, follow the following steps:
yarn install
yarn dev
Preview