December 15, 2022, 4:49pm
I’m trying to validate the access token I receive from my react native app in the backend using the Auth0 PHP package. But I keep getting the following error
Auth0\SDK\Exception\InvalidTokenException: The JWT string must contain two dots in Auth0\SDK\Exception\InvalidTokenException::badSeparators() (line 42 of /Users/USER/Sites/APPNAME/vendor/auth0/auth0-php/src/Exception/InvalidTokenException.php).
But checking the token I’m sending, it does contain 2 dots, here is what I’ve done in the backend:
Is there anything I’m doing wrong?
Welcome to the Auth0 Community!
Could you provide an example token you are seeing? Have you tried decoding it with
December 15, 2022, 8:41pm
Here is an access token:
I’ve tried decoding it with
JWT.io but without success
That appears to be an opaque token. You will need to request a JWT. Here’s an FAQ about it:
Question: Why is my access token not a JWT? (Opaque Token)
An access token will be issued in one of the following formats:
JSON Web Token (JWT) : Tokens that conform to the
JSON Web Token standard and contain information about an entity in the form of claims. They are self-contained in that it is not necessary for the recipient to call a server to validate the token. Access Tokens issued for the Auth0 Management API and Access Tokens issued for any custom API that you have registered …
January 30, 2023, 9:40pm
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.