Trying to validate Access token with Auth0 PHP, but I get The JWT string must contain two dots

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?

Thanks

Hi @mmmaxxx,

Welcome to the Auth0 Community!

Could you provide an example token you are seeing? Have you tried decoding it with JWT.io?

Hi Dan
Here is an access token:

eyJhbGciOiJkaXIiLCJlbmMiOiJBMjU2R0NNIiwiaXNzIjoiaHR0cHM6Ly9kZXYtazFreTF1OGd4aXRndTdqcy51cy5hdXRoMC5jb20vIn0..J-lwvtJENQqaGaIu.XBOufABotm_we9vhPzaSm9TPrU9tfQAfJ3Sqpheif0gTLpR2Q8rSjf6t0TSQ3jl_OlYmVJ8UvcLO0mJZz9KbGdfzJPqqXc5YdbKgwX8kHF5DqB5ld7gwe24V4YaItaEH00cI-oKG5T9P69bTTmg4UZBAlx_A7-B5knnFBi5CoKWH34zAkNhKjwaOVare_kislgZg-yXGijSI82Hf4hGBvmFJqyo6a5-FF1Bjq-s0hcWszdL6QYGSz0kNCrMnjAfpE8q9wNXnwNNfXLgLY8M2d7Ii1NHtIlM7L4oZ9V-MFuaBtqPJe6oitjrZMWbR8AxFjVae8r2fGtTiw596kanYkNaMxhhIKgRgdjDOxOfPE_9EyGtB0lG9y9mL1m-cqn2GB3aNoQ.7AP6u3CszXy4E4qEN17zvg

I’ve tried decoding it with JWT.io but without success

@mmmaxxx,

That appears to be an opaque token. You will need to request a JWT. Here’s an FAQ about it:

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.