flutter_appauth icon indicating copy to clipboard operation
flutter_appauth copied to clipboard

Invalid accessToken

Open mvosantos opened this issue 1 year ago • 1 comments

I'm trying to authenticate with my Microsoft Entra ID. I'm able to authenticate and I even get my accessToken, idToken and refreshToken, however when I try to validate the token on https://graph.microsoft.com/v1.0/me, it shows me the following error:

{"error":{"code":"InvalidAuthenticationToken","message":"IDX14100: JWT is not well formed, there are no dots (.).\nThe token needs to be in JWS or JWE Compact Serialization Format. (JWS): 'EncodedHeader.EncodedPayload.EncodedSignature'. (JWE): 'EncodedProtectedHeader.EncodedEncryptedKey.EncodedInitializationVector.EncodedCiphertext.EncodedAuthenticationTag'.","innerError":{"date":"2024-12-06T14:08:01","request-id":"xxxx","client-request-id":"xxxx"}}}

I've tried with idToken and refreshToken, but it doesn't work either.

mvosantos avatar Dec 06 '24 14:12 mvosantos

This is outside the control of the plugin. Are you checking this by having the app call or are you copying and pasting results from your IDE? What you've described makes me think you may have done the latter and I've seen that VS code truncates values

MaikuB avatar Jan 09 '25 07:01 MaikuB