title: React Native AuthSession.startAsync does not close window after successful login
body: <p>I am building a web app with react native and expo.  I am trying to integrate with auth0 and calling the authorize API.  When I use AuthSession.startAsync it opens up a new window and redirects to auth0 fine but when I complete the login it does not redirect the user back to the app and just redirects to the webapp in that popped up window.  When I close the window the response back from authSession.startAsync is : {type: &quot;dismiss&quot;}. It does not get the params from the auth0 URL.  I am not sure what I am doing wrong.</p>
  <pre><code>login = async () =&gt; {
      // Retrieve the redirect URL, add this to the callback URL list
      // of your Auth0 application.
      const redirectUrl = AuthSession.getRedirectUrl();
      console.log(`Redirect URL: ${redirectUrl}`);
  
      // Structure the auth parameters and URL
      let authUrl =
        `${auth0Domain}/authorize` +
        toQueryString({
          client_id: auth0ClientId,
          response_type: &quot;token&quot;,
          scope: &quot;openid profile email&quot;,
          redirect_uri: redirectUrl,
        });
      console.log(`AuthURL is:  ${authUrl}`);
  
      // Perform the authentication
      const response: any = await AuthSession.startAsync({
        authUrl: authUrl,
        returnUrl: redirectUrl,
      });
      console.log(&quot;Authentication response&quot;, response);
  
      if (response.type === &quot;success&quot;) {
        this.handleResponse(response.params);
      }
    };
  
    handleResponse = (response: any) =&gt; {
      if (response.error) {
        Alert.alert(
          &quot;Authentication error&quot;,
          response.error_description || &quot;something went wrong&quot;
        );
        return;
      }
  
      // Retrieve the JWT token and decode it
      const jwtToken = response.id_token;
      const decoded = jwtDecode(jwtToken);
  
      const name = { decoded };
      this.setState({ name });
    };
  </code></pre>