1
I’m doing a login system on php and trying to authorize with JWT
. I’m not using any library, I made a class called Jwt
that I pass the vestments and Token and also step the token and returns me an object with payload information.
So far the logic of my system is so:
In my code I have a route /login who sends the form data to /login/auth and within the /auth I do the consultation on BD
and if it works out I will token
My question is:
How to check the token on each request?
I can save the token in a cookie
?
At each check I will have to consult the BD
to verify the token?
If you’ve done it in another language you can say, maybe it’ll help me in logic.
I will wait for the answer of someone more experienced, because in my system I do the token verification in BD
– Wees Smith
That was the first time I asked here, it usually takes someone to answer?
– Kelvys Moura