Closed markvital closed 2 years ago
Found this on auth0 website:
Access tokens cannot be invalidated: they are designed to be self contained, not requiring a check with Auth0 to validate, so there is no way to invalidate them.
For this reason, access tokens should have a short lifetime.
So it looks like access token should not be invalidated after logout, only refresh token
You can add a field to the user table that restricts access tokens. Then check this field in the passport's config, if true, restrict the user to use the access token
It looks like a user is able to access resources that need authentication even after access/refresh tokens are removed (logout event)
To reproduce:
I assume after user logout, access token associated with current refresh token should become invalid, correct?