Hiding the auth.expo.io redirecting page

I am using expo auth-session service.
When the in app browser is initiated, before redirecting to my login page, the following page is presented for a few seconds:

It bothers my client and I wonder if there is a way to control this page so I can render a more user friendly message with my customer’s logo and brand.

Hey @guy1812,

You can pass in some options to promptAsync to configure this. https://docs.expo.io/versions/v37.0.0/sdk/auth-session/#authrequestpromptoptions

It also will probably be worth reading this https://docs.expo.io/versions/v37.0.0/sdk/auth-session/#what-authexpoio-does-for-you if you haven’t already.


Hey @adamjnav,
Thank you for your reply.
Using promptAsync requires upgrade expo-auth-session to 1.3.1.

  • I am using expo 37.
  • Node 12.14.0.
  • Attempt to use “expo upgrade” leaves me with expo-auth-session@1.2.1 which does not know of promptAsync.
  • Attempt to change package.json to expo-auth-session to 1.3.1 and then remove all node_modules and reinstall then rerun show error on load (before even calling AuthSession):
    Unable to resolve module 'assert' from 'node_modules/expo-auth-session/build/QueryParams.js': assert could not be found within the project.
    I think it is related to linking.
  • Attempt to run expo install expo-auth-session@1.3.1 leaves me with expo-auth-session@1.2.1.

Can you assist me here?

Hey @guy1812,

I’m going to route this to the team member who has worked on auth session most recently and see if we can get this sorted. I can confirm that I got the same assert error when adding 1.3.1 to a new project.

1 Like

Looks like assert is a missing dependency, you can install it with yarn add assert.

I’ve also open a PR to remove the dependency altogether: https://github.com/expo/expo/pull/8934 will be publishing later today.

1 Like

The latest version expo-auth-session@1.4.1 has assert removed.

I am going by your example: https://github.com/expo/examples/blob/master/with-auth0/App.js
But since Im writing with typescript:

  1. AuthSession.useAuthRequest 's first parameter has a responseType key - on your example you used a string but it’s required type is AuthSession.ResponseType and it’s enums options are “Code” or “Token”. and I need “id_token”.
  2. The second parameter is of type AuthSession.DiscoveryDocument where “tokenEndpoint” and “discoveryDocument” are required as well. From your example it looks like the required flags are not necessary?

I am correcting my above reply:

  1. AuthRequest.ResponseType does have IdToken key. it was only the expo docs that are not updated: https://docs.expo.io/versions/latest/sdk/auth-session/#responsetype
  2. Same with Discovery document. while the code does not state it, the docs are describing required fields: https://docs.expo.io/versions/latest/sdk/auth-session/#discoverydocument