Redirect to login page if username/password valid with JWT
Closed this issue · 3 comments
This feature is contingent on including JWT (JSON Web Tokens) into our workflow. If login is successful, we expect to receive a JWT in the API (axios) call response. As JWTs are not currently implemented, a successful login does not perform a redirection to the authenticated page.
Task: Redirect to the authenticated login page using JWT on successful login.
Contingent on: JWT implementation.
JWT is already generated in the registration route, and it should be generated the same way in the login route. As we have no authenticated routes yet, this is the full extent of what we expect the REST API to do with JWT, for now--sign a token with the jwt
import and hand it directly back to whomever calls these two routes.
JWT is already generated in the registration route, and it should be generated the same way in the login route. As we have no authenticated routes yet, this is the full extent of what we expect the REST API to do with JWT, for now--sign a token with the
jwt
import and hand it directly back to whomever calls these two routes.
Based on what you're saying here, perhaps it makes sense to close this issue?
Sounds good, to close. The redirection is also part of the user story, so I'll handle it there. I just want to add anti-CSRF, first.