2

I am using JWT to generate the token for some purpose in my application. The issue is, there is a possibility of generating multiple tokens for the same user. So, to avoid this, I need to expire previous token before giving them a new token.

Can someone please help me out in, how to expire the token then and there using JAVA?

Sindhu Raju
  • 183
  • 1
  • 12
  • The short answer is: "You don't". The long answer is here: https://stackoverflow.com/questions/31919067/how-can-i-revoke-a-jwt-token – Jan Thomä Aug 12 '19 at 11:45
  • Thanks for you reply but I need to handle a situation of sending multiple tokens to the same email-Id. How do I handle this? This is basically for forgot-password application. – Sindhu Raju Aug 12 '19 at 12:19
  • I have answered for this question. Please refer to this https://stackoverflow.com/questions/31919067/how-can-i-revoke-a-jwt-token/57522538#57522538 link. – Sindhu Raju Aug 16 '19 at 09:57

0 Answers0