Which status code would you use in this scenario, assuming you're using a token based authentication:
- The client has a token and makes a request to the server.
- The token expired and the server sends a 401 Unauthorized.
- The client sends the refresh token.
- The token is invalid and the server responds with XXX?
The use case would be an application, that automatically catches 401's and makes a request with the refresh token. If the server would respond with a 401 if this token is not valid, the client would try to request a new access token with the refresh token forever. But it should tell the client, that it should re-authenticate with its credentials (e.g. email and password).
I was just wondering which status code would be the best fit in this scenario, as the spec says in case of a 403 Forbidden "authorization will not help".