• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How consume JWT token?

#1
Hi
In this my project,user try to login and send sms to user and return JWT token
So when user enter confirmation code and login to app and also receive new JWT token
But i need consume or destroy login JWT token until user cannot use prev token for retry login with it token

Here:
1- Login user
2- get token contain code and mobile example
eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoiMSIsIm1vYmlsZSI6IjA5MTI0OTUyNzM1In0.IU_2kJd23sUgC-bNiBHKOofs1mdtyCnfWLEZTuJmsXY

3- user enter confirmation code and send with above token to controller

4- if token is OK,so login to app and create new token

there is a important problem

If user send again -2 token to controller,user can again make new token and receive
but i need destrory relate token example unset session for prevent access use to above token

Thanks
Reply


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.