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/yoto+jordan/user model 3 #11

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

JordanJunaidi
Copy link

Tracking Info

Resolves #7

Changes

  • Created User model containing name, email, and UID
  • Set up Firebase auth
  • Created /api/whoami route to ensure user auth and retrieve user information from MongoDB

Testing

  • Pre-populated database with users for testing in local MongoDB
  • Used Postman to test /api/whoami route

Confirmation of Change

Retrieve auth token:
image

Use token to retrieve user information from MongoDB:
image

@yxli001
Copy link

yxli001 commented Feb 6, 2025

hey @yotzkim @JordanJunaidi can you guys add the service account key to the google drive so we can test out the changes?

@JordanJunaidi
Copy link
Author

hey @yotzkim @JordanJunaidi can you guys add the service account key to the google drive so we can test out the changes?

just added it to the drive as env2.backend @yxli001

@yxli001
Copy link

yxli001 commented Feb 7, 2025

just added it to the drive as env2.backend @yxli001

got it

It might be a good idea to fix the lint errors before merging. I think one of them in firebase.ts is unavoidable and can be ignored by adding this in .eslintrc.json:

"import/no-unresolved": [
  "error",
  {
    "ignore": ["^firebase-admin/.+"]
  }
],

And then the rest can probably all be fixed with a validator for environment variables and by adding validators for req.body on the middleware and the route.

Copy link

@yxli001 yxli001 left a comment

Choose a reason for hiding this comment

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

lgtm!

Copy link
Member

@willcyber willcyber left a comment

Choose a reason for hiding this comment

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

nice job!

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.

User Model
4 participants