H-BAHDON / class-of-our-own

At Code Your Future, trainee progress is tracked on a trainee tracker against milestones set by the Director of Education. But each trainee at CYF is on their own personal journey towards employment, and should really set their own milestones on their own roadmap.
MIT License
2 stars 1 forks source link

[US-1] Implement JWT middleware #29

Closed H-BAHDON closed 11 months ago

H-BAHDON commented 11 months ago

After GitHub user authentication, we need to implement user frontend authentication. JWT must be the right solution for it. Can we use passport-jwt for this purpose? If not, we need to implement our custom middleware to handle and verify JWT.

Generate the initial JWT in /auth/github/callback endpoint. Add user's first name on JWT, so it can be accessible later from frontend.

Acceptance criteria