Using JWT for API verification, how to design the logic of token refresh? Save the generated token and a refresh token?
Does JWT also need to save the generated token? When users reapply for tokens, change passwords and perform other operations, clear the original token?
oAuth and JWT are a bit confusing.
JSON Web Token
is a very lightweight specification. This specification allows us to use JWT to pass secure and reliable information between users and servers.
See http://blog.leapoahead.com/20….
OAuth
OAuth is an open network standard for authorization.
See http://www.ruanyifeng.com/blo….
So
Both use tokens to verify whether the request is safe.
However, the two should not be confused, because one is a bird and the other is a cannon.