Getting Valid IdToken ,But Invalid AccessToken

Please include the following information in your post:

I built a custom UI in Android App which captures the User’s Mobile Number And OTP, and I am using
AuthenticationAPIClient to send OTP and verify OTP ( GitHub - auth0/Auth0.Android: Android toolkit for Auth0 API), After verifying OTP successfully, I am getting an invalid access token and getting a valid ID token(when checked in JWT.IO). not sure what’s going wrong,
is there any way to pass “Audience” using AuthenticationAPIClient? , is this the proper way to do it?

Hello @thupili_charwaka welcome to the community!

I don’t believe there is - The recommended approach here is to use WebAuthProvider as outlined in our Android quickstart - This method will use a call to /authorize where an audience param can be included. Please see our Android sample:

Hope this helps!

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