But now I wonder how I should handle more than one token?
I mean, a user post his credentials to "/auth" and then return a token to a client.
When the client send a new request he should sent the token.
My question is how I know what "token" belongs which user and where "tokens" are stored?
Should I store in database?
I'm new using JWT so I run the example where I find in docs. I read this https://auth0.com/blog/2014/01/07/angularjs-authentication-with-cookies-vs-token/ to get a better understanding of JWT.
But now I wonder how I should handle more than one token? I mean, a user post his credentials to "/auth" and then return a token to a client. When the client send a new request he should sent the token.
My question is how I know what "token" belongs which user and where "tokens" are stored? Should I store in database?