Expo App Auth error "redirect_uri_mismatch" when trying to get google classroom api

I am trying to get AppAuth up and running in my expo app that I have not ejected from. I am trying to use the AppAuth in order to get Google Classroom data. I am attempting to open up the AppAuth flow in my app after configuring credentials, but once the continue button is pressed to sign in with google using Expo, it takes me to the app browser, where I get an error:

  1. That’s an error
    Error: redirect_uri_mismatch

openCalendar = async () => {
const config = {
issuer: ‘https://accounts.google.com’,
clientId: ‘My_Actual_ClientID’,
scopes: [‘https://www.googleapis.com/auth/classroom.courses.readonly’],
};

const tokenResponse = await AppAuth.authAsync(config);

}

The proposed redirect URI is host.exp.exponent:/oauthredirect
The Client ID, scopes and issuer are all okay, but my redirect uri is not working. How would I get my redirect URI up and running?

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