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

Firebase Authentication + Login UI #35

Closed
jennymar opened this issue Apr 18, 2024 · 0 comments
Closed

Firebase Authentication + Login UI #35

jennymar opened this issue Apr 18, 2024 · 0 comments
Assignees

Comments

@jennymar
Copy link
Collaborator

jennymar commented Apr 18, 2024

Description: Use the Firebase API for authentication with email + password (don't worry about sign in with Google for now). Access the 4flot-dev Firebase here. No need to do any account creation - I created an account with credentials in the slack channel. Also, develop the frontend login page UI.

Figma: Login, Logout

Frontend

  • Create the frontend styling and page content for /admin according to the figma
  • Create the profile icon + dropdown for logout according to the figma. The admin portal nav bar + top bar feature is created and will be merged in main soon so you can use that. Ignore the "View Profile" option as we'll be cutting that feature.
  • Some starter code to initialize firebase in /frontend/src/app/admin/firebase - feel free to edit, change, or not use but might be helpful
  • When the user inputs the email and password, sign in using Firebase Auth and get JSON Web Token (JWT)
  • Send token to backend for authentication: frontend should send the auth token on future requests to our backend as a header, so our backend knows who they are

Backend

  • Initialize Firebase Admin with the SERVICE_ACCOUNT_KEY environment variable
  • Decode the auth token sent from the frontend - if it's valid let the user sign in, if not throw an error
  • No need to create a MongoDB collection for users since we only have 1 user and we just need to verify that it is that user
image image
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

No branches or pull requests

3 participants