angular - Auth0 JWT Token validation in PHP
Get the solution ↓↓↓Solution:
You should use an existing library that supports the type of JWT signature you're using. For a quick reference on your available options for PHP check the Libraries section in jwt.io.
Using an existing library is preferred in most situations, however, it's also important to do some assessment on the quality of the library.
For JWT signature validation read this article (Critical vulnerabilities in JSON Web Token libraries) to ensure that your usage of the libraries does not lead to possible vulnerabilities.
Update:
The tokens are different because they are signed with different keys and the payload also differs; theiss
in one is"https://lowie.eu.auth0.com/"
and on the other is"https:\/\/lowie.eu.auth0.com\/"
. You can check that by decoding the payload with a Base64 decoder and look at the raw output.
More importantly, you should not be creating any tokens, just validating that they are valid and were issued by the trusted issuer to which you delegated the actual authentication process.
Share solution ↓
Additional Information:
Link To Answer People are also looking for solutions of the problem: trying to access array offset on value of type null
Didn't find the answer?
Our community is visited by hundreds of web development professionals every day. Ask your question and get a quick answer for free.
Similar questions
Find the answer in similar questions on our website.
Write quick answer
Do you know the answer to this question? Write a quick response to it. With your help, we will make our community stronger.