Laravel + JWT
Hello, I'm trying to learn how JWT works with Laravel. I'm using the following library: https://github.com/tymondesigns/jwt-auth.
This is what I understood so far:
-
The user login. By loggin in, the application returns a token. This token contains the user credencials encrypted.
-
Whenever the user requests for information, the requests needs to have that given token in the header like: Authorization: Bearer {token}.
Now, thats the easy part, but there are a few things I get pretty confusing. For example:
-
What if the token expires? The user needs to write its credentials again?
-
How do I retrieve the information sent?
Thanks in advance!
Please or to participate in this conversation.