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

Create JWT + Validate JWT Functionality #11

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

Conversation

SamratSahoo
Copy link
Member

@SamratSahoo SamratSahoo commented Oct 25, 2023

Issues

Fixes #3 and #5

Testing

  • Yeah, idk how to test this, but my brain's compiler works when I walk through this, lol.

Development Notes

  • Major Concern: I have defined a lot of types in the proto folder - not sure if there is a better way to standardize this (both in terms of naming convention and when we should be defining new types) - but this is something we should definitely seek out to set.
  • Right now, I have a couple of empty interfaces defined in the API key controller - i.e. getProjectByApiKey, validateHashedApiKey, and getHashedApiKey which need access to the database information - I'm not sure how this works but those will need to be filled in for the end to end flow to work -- EDIT: Need hayden to finish up his ticket to have a API key database service I can call
  • I have a JWT secret coded in via environment variables but also have a back-up in case the person does not set this: process.env.JWT_SECRET ?? 'secret' -- we should find a way to define constants for testing environments (i.e. not hard code in secret)
  • JWTs are set to expire in 60 mins
  • Only have minimal error handling and testing for now.
  • Not sure if the structure of the code is correct

@SamratSahoo SamratSahoo marked this pull request as ready for review October 29, 2023 16:06
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.

Create JWT Generation Flow
2 participants