Google Redirect Url For Development Setup Using Expo-auth-session

I am are trying to get Oauth flow working on a mobile app built with React Native and the “expo-auth-session” library, which has out-of-the-box support for Google OAuth. See Authentication with Google and AuthSession API - Expo Documentation.

The redirect URI works if we enter a production value such as “com.mydomain.myapp:/oauth”, but the expo-auth-session library provides tools to run development apps locally using a local HTTP server. In this scenario, the redirect URI value needs to be something similar to “exp://–/oauth2”, which google does not allow, as we get an error “Access blocked: authorisation error” - “Error 400: invalid_request”. Note that we have also tried using localhost with a redirect uri such as “exp://localhost:19000/–/oauth2”, which also results in the 400 error.

const redirectUri = makeRedirectUri({ scheme: 'com.mydomian.myapp', path: '/oauth2', preferLocalhost: true // also tried false });

const [request, response, promptAsync] = Google.useAuthRequest({ androidClientId: ANDROID_CLIENT_ID, iosClientId: IOS_CLIENT_ID, redirectUri: redirectUri, scopes: ["profile", "email"] }, { useProxy: false });