Hello all,
When a token is expired, we generally redirect the user to the login
screen, but it is not a good user experience, especially when a user
is in the middle of executing any business process.
To handle this and avoid authentication with username and password again,
In OAuth2 [1], the concept of the refresh token [2] was introduced.
Refresh tokens are credentials used to obtain access tokens.
Refresh tokens are issued to the client by the authorization server
and are used to obtain a new access token when the current access
token becomes invalid or expires.
The life of the refresh token is much higher than the access token and
it can be used only to get a new access token, and not able to access
any other resource on the server.
In Moqui, do we any similar kind of implementation or is there any
recommended way to handle the expired token gracefully for REST APIs?
If you have any inputs or suggestions on how to handle the expired
tokens and reauthorize the user for the REST API calls without
enforcing to provide the username/password credentials again, please
let me know, thank you!
[1]
https://tools.ietf.org/html/rfc6749
[2]
https://tools.ietf.org/html/rfc6749#section-1.5
Best Regards,
Swapnil M Mane