Skip to content

What is the difference of use JWT_SECRET and certificates? #189

Answered by leon0399
hjJunior asked this question in Q&A
Discussion options

You must be logged in to vote

It all starts with JWT structure. Last third part is a token signature, which allows to authorize and authenticate your user identity. You can read more here

Interesting things start happen, Whalen your services scale, and more and more different services (it may be not only laravel projects) require user authentication

With JWT_SECRET for signing tokens symmetrical cryptography is used, which means the same "password" is used for both signing (issuing) tokens and validating them
And certificates are using asymmetrical cryptography, which using separate private and public keys for signing and validating tokens respectively

When using microservices it is recommended to use separate authori…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@hjJunior
Comment options

Answer selected by hjJunior
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants