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.
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
Respond with 401 Unauthorized error code if no token has been received
Respond with 403 Forbidden error code if the token is invalid
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
401 Unauthorized
error code if no token has been received403 Forbidden
error code if the token is invalid