Issue on Android: Auth0 not redirecting back to the app after Google login in React Native Expo

I’m using Auth0 to authenticate users in my React Native app with Expo. The login flow works perfectly on iOS, where the app redirects correctly after signing in with Google. However, on Android, after completing the login, it doesn’t redirect back to the app, leaving the user stuck without returning to the app interface. Has anyone faced this issue and found a solution?

I’ve checked the URI and redirect settings in Auth0, and everything seems correctly configured, but the issue persists only on Android. Any ideas on what might be causing this or how to fix it?

Hi @mario4,

Welcome to the Auth0 Community!

Can you confirm that your callback and logout URLs are configured according to this React Native Expo guide: Auth0 Expo SDK Quickstarts: Add Login to your React Native App

Best,

Mary Beth

My Expo version:
expo@51.0.35

The version "react-native-auth0": "^3.2.1" is not compatible with this Expo SDK version. Running prebuild with this version generated the following manifestPlaceholders in android/app/build.gradle:

manifestPlaceholders = [auth0Domain: "xxx.us.auth0.com", auth0Scheme: "com.xxx.xxx.auth0"]

To resolve this issue, I updated to:
"react-native-auth0": "4.0.0-beta.0"

Then, in android/app/src/main/AndroidManifest.xml, I added the following configuration:

<activity android:name="com.auth0.android.provider.RedirectActivity" 
          tools:node="replace" 
          android:exported="true">
    <intent-filter>
        <action android:name="android.intent.action.VIEW"/>
        <category android:name="android.intent.category.DEFAULT"/>
        <category android:name="android.intent.category.BROWSABLE"/>
        <data android:scheme="com.xxx.xxx.auth0" android:host="xxx.us.auth0.com"/>
    </intent-filter>
</activity>

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