expo-auth-session address is invalid in production

  • SDK Version: 39
  • Platforms: Android/iOS

Hello. I am using expo-auth-session to get an access token from Google. It works in development locally, but it doesn’t work in the published app.

The error I see when authentication with Google is done, is: “Safari cannot open the page because the address is invalid”.

I get a redirect URI like this:

const redirectUri = makeRedirectUri({
  native: 'https://auth.expo.io/@webjay/gnews',
  useProxy: true,
});

My app.json:

{
  "expo": {
    "name": "gNews",
    "slug": "gnews",
    "scheme": "gnews",
    "version": "1.0.1",
    "orientation": "portrait",
    "icon": "./assets/icon.png",
    "splash": {
      "image": "./assets/splash.png",
      "resizeMode": "contain",
      "backgroundColor": "#59748c"
    },
    "updates": {
      "fallbackToCacheTimeout": 0
    },
    "assetBundlePatterns": [
      "**/*"
    ],
    "ios": {
      "supportsTablet": true,
      "bundleIdentifier": "dk.webcom.newsfilter",
      "buildNumber": "1.0.2"
    },
    "android": {
      "package": "dk.webcom.newsfilter",
      "versionCode": 1
    },
    "web": {
      "favicon": "./assets/favicon.png"
    }
  }
}

Please give me a hint as to what could be wrong.

I haven’t had any success getting that library to work with standalone either. It works perfectly in expo client / simulator thought Something is missing in the docs or the implementation. There are several of us struggling with this exact issue. Don’t waste any more of your time until we get help from the expo team. I have already wasted many many valuable hours trying all sorts of things to get it to work.