Access Token is not valid and is truncated

We are facing an issue with the authentication of the user and receiving a valid access token for usage in API.
Here is the authorization request that we use:

final AuthorizationTokenResponse? result =
await appAuth.authorizeAndExchangeCode(AuthorizationTokenRequest(
'cbGHti4Cgf8SbDVmucnfkgbSorLSCfmZ', 'com.example.AnoGeo://anogeo.eu.auth0.com/ios/com.example.AnoGeo/callback',
issuer: 'https://anogeo.eu.auth0.com',
scopes: ['openid', 'profile', 'offline_access'],
additionalParameters: {
'audience': 'anogeo-api',
},
));

After the successful beginning we receive AuthorizationTokenResponse with the next access token:

“eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCIsImtpZCI6ImdoSERjX1J3OGYxcW5tb3dNTXpZSyJ9.eyJpc3MiOiJodHRwczovL2Fub2dlby5ldS5hdXRoMC5jb20vIiw…”

which is not valid if to check in jwt.io or our API.

Where can be an issue and how to receive the correct access token to work with our API?

1 Like