revokeTokensForUser Not working #1501
Unanswered
rodolphonetto
asked this question in
Help
Replies: 1 comment 4 replies
-
JWTs can't be revoked, that's the point of JWTs :) They are totally stateless, once they are generated they can't be revoked |
Beta Was this translation helpful? Give feedback.
4 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi guys
I'm loggin a user doing this.
const token = await auth.attempt(user.email, password, { user })
then I catch the token and set on postman as a bearer token
then when I try to revoke it doing this
const user = await User.findOrFail(auth.user.id)
await auth.authenticator('jwt').revokeTokensForUser(user)
The token stil working, what I'm doing wrong?
Beta Was this translation helpful? Give feedback.
All reactions