AuthSession promptAsync and testflight doesn't work

Please provide the following:

  1. SDK Version: 40
  2. Platforms(Android/iOS/web/all): iOS

Some relevant code:

const useProxy ={
    web: false,
    default: Constants.appOwnership === "standalone" ? false : true,

const SCHEME = Constants.manifest.scheme

const redirectUri = AuthSession.makeRedirectUri({
    native: `${SCHEME}://redirect`,

const authRequestConfig = {
    clientId: authClientId,
    // id_token will return a JWT token
    responseType: 'token', //'id_token',
    // retrieve the user's profile
    scopes: ['read:current_user'],
    prompt: 'login',
    extraParams: {
      // ideally, this will be a random value
      nonce: 'nonce',
      audience: authAudience,
      prompt: 'login'

const [request, result, promptAsync] = AuthSession.useAuthRequest(authRequestConfig, authRequestDiscovery)

const login = () => promptAsync({ useProxy })

My Auth provider is Auth0 (which apparently was a big mistake as it doesn’t seem expo and auth0 play well together and no one can get a working example going). This code works great in expo go! Clicking on the login button will open a browser to authentication. But it doesn’t work in testflight when I build/submit (clicking the button and no browser opens)… I thought it was maybe something with the standalone vs expo appOwner but I did an archived build using an adhoc provisioning profile and manually installed it into the device and it works fine there (clicking login opens a auth session browsers)! Just wont open a browser for authentication in testflight… So FRICKEN FRUSTRATING!!! Trying to capture logs on the device is hopeless as there are so many logs coming from the device every second that I can’t find any debug information I’m sending to console… I decided to just submit this build to the app store for review but I’m guessing if testflight wont let the auth session browser open (like literally nothing is happening when I click the login), then I’m guessing it wont work for the app store reviewer, or even the end user once it’s on the store… I really need help on this one as I’ve been struggling with this for over a week and a half now.

Simulator: Works as expected
Expo Go client via publish: Works as expected
Archived Ad Hoc standalone manual install: Works as expected
Testflight: Nothing… notta… Zip… zilch…

bump… seriously… like app store cant even review it since it doesnt work… wtf

Attempting to use expo to build and attach a manually created app store provisioning profile to see if it’s a problem with the one created by EAS or maybe with EAS in general…

ok, so submitting the build to testflight that was built using expo with a manually created app store distribution provisioning profile has worked. The promptAsync opens a auth browser. Submitting for review to see if the reviewer can get it to work too… Stay tuned

Hm, I’m not sure what the issue could be with the provisioning profile that affects expo-auth-session

Some things I should mention based on reading your code snippet:

  • make sure SCHEME is an actual value and not undefined
  • Constants.appOwnership === "standalone" is false in apps built with EAS Build
  • Constants.appOwnership === "standalone" is false in apps built with EAS Build

Wait… What?
Documentation doesn’t indicate that at all!!!

How did you determine that?

Yeah, sorry about that, it’s not well documented but standalone refers to apps built with the classic expo build system (it links out to that doc page). You can fix this by inverting your check to something like:

const useProxy ={
    web: false,
    default: Constants.appOwnership === "expo",

I tried useProxy as true and it still didnt work (promptAsync didnt open a browser) with testflight… And I tried it with false… neither works when using EAS build and testflight…

please note that if you are indeed using expo sdk 40 on eas build that is going against our recommendations. we advise that you use expo sdk 41 or greater. that could very well be a source of the problem. we call this out in Creating your first build and Migrating from expo build. i’d recommend updating to sdk 42 for best results.

I’ll spend some time doing that this week and test the results. Thank you

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