You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Before you get started look at the CTC Auth Project Frontend and understand the code, as the majority of this task's code is already provided in that repo
If you want to clone and run the project, the .env and firebase-adminskd.json can be found in this google drive
Set up a route to create an account using email and password.
Set up a route to reset password.
Set up a route for email action used to verify email and reset password (refer to the EmailAction component)
Set up a route to log in with email and password.
Set up a route to log out the user.
For all of these functionalities, refer to the Auth Utils file and the components from the frontend.
Summarized flow
Signing Up
input email and password
get a verification email
verify email (link in email redirects to website)
show confirmation page
Logging in
input email and password
if not verified or account does not exist, show error message
successful login redirects to dashboard page
this page doesn't exist yet, so you can create a dummy page + route for /dashboard
Forgot password
input email
received email link (redirects to website)
input new password
update in FIrebase
Notes
Remember to add the frontend .env.
Creating a user in the database and anything to do with roles can be put on hold until the user routes are created.
Each of the pages can be minimal for now since the design is not finalized yet.
Simple forms with labels and inputs will do for now
A lot of the functions should be able to be copied and pasted from Auth Frontend, but there may be errors.
Acceptance Criteria
Signing up creates an account in the Firebase console. The user email should receive a verification email.
Can log in with an existing account. Cannot log in if the account does not exist or the user email is not verified.
On successful login, redirect to the /dashboard for the dashboard.
Store relevant information in cookies.
Any error shows the corresponding error on the page.
A successful login redirects to a "dashboard" page (this can be any temporary page for now).
Can sign out and doing so clears any cookies set. Redirect to login page
A user who tries to access any Protected Route is redirected to the login page.
Implement one sample Protected Route that is accessible to certain roles (ex: only super admin or admin can access).
Instructions
.env
andfirebase-adminskd.json
can be found in this google driveEmailAction
component)Summarized flow
Signing Up
Logging in
/dashboard
Forgot password
Notes
Acceptance Criteria
/dashboard
for the dashboard.Protected Route
is redirected to the login page.Protected Route
that is accessible to certain roles (ex: only super admin or admin can access).Resources
createUserInFirebase
registerWithEmailAndPassword
logInWithEmailAndPassword
sendPasswordReset
As always, feel free to dm Michael and Michelle on Slack if you have any questions
The text was updated successfully, but these errors were encountered: