title: React-Native Expo app Auth0 login, AuthSession - authURL fails
body: <p><a href="https://i.stack.imgur.com/keDzv.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/keDzv.jpg" alt="screenshot of error"></a>I'm trying to setup my login to my react native Expo app using AuthSession.</p>
  
  <p>I keep getting this error: ValidationError: child "authUrl" fails because ["authUrl" must be a valid uri]".</p>
  
  <p>The weird thing is, if I console log the URI that is getting passed, copy it, and paste it into a browser, it works! (pulls up the Auth0 login screen as expected).</p>
  
  <p>Why am I getting this error when trying to call it from my Expo client app?</p>
  
  <p>Here's my code:</p>
  
  <pre><code> function toQueryString(params) {
    return '?' + Object.entries(params)
      .map(([key, value]) =&gt; `${encodeURIComponent(key)}=${encodeURIComponent(value)}`)
      .join('&amp;');
  }
  
  class SignInScreen extends React.Component {
  
  logIn = async () =&gt; {
    const redirectUrl = AuthSession.getRedirectUrl();
    console.log(`Redirect URL: ${redirectUrl}`);
  
    // Structure the auth parameters and URL
    const queryParams = toQueryString({
      client_id: auth0ClientId,
      redirect_uri: redirectUrl,
      response_type: 'id_token', // id_token will return a JWT token
      scope: 'openid profile', // retrieve the user's profile
      nonce: 'nonce', // ideally, this will be a random value
    });
    const authUrl = `${auth0Domain}/authorize` + queryParams;
  
    // Perform the authentication
    const response = await AuthSession.startAsync({ authUrl });
    console.log('Authentication response', response);
  
    if (response.type === 'success') {
      this.handleResponse(response.params);
    }
  };
  
  handleResponse = (response) =&gt; {
    if (response.error) {
      Alert('Authentication error', response.error_description || 'something went wrong');
      return;
    }
  
   console.log(response.id_token)
  };
  </code></pre>