Closed Monstarrrr closed 1 month ago
I'm on it
I have a problem with the authenticator middeware which is that I don't know beforehand if i'm verifying an access or refresh token, but the jwt.verify(token)
throws an error if it fails so i'm trying to not make the jwt.verify(accessToken)
crash the route if accessToken is invalid so I can try with the refreshToken but I haven't been able to yet.
Update: actually I think it should be handle automatically by the client making a request to refresh the token if accessToken isn't valid anymore so checking for an accessToken only is the normal behaviour
Problem
For initializing the mock API and know if everything works with the front-end, we need to create the currently existing production routes in the Mock API
Current routes:
Solution
Create 'em
*Field errors are sent the following way:
Global errors are sent the following way: