How to use the expo-web-browser.dismissBrowser function in expo-web-browser

To help you get started, we’ve selected a few expo-web-browser examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github sysgears / apollo-universal-starter-kit / modules / user / client-react / components / LoginView.native.jsx View on Github external
if (!url.match(dataRegExp)) return;

    // Extract stringified user string out of the URL
    const [, data] = url.match(dataRegExp);
    const decodedData = JSON.parse(decodeURI(data));
    const { client } = this.props;

    if (decodedData.tokens) {
      await setItem('accessToken', decodedData.tokens.accessToken);
      await setItem('refreshToken', decodedData.tokens.refreshToken);

      await authentication.doLogin(client);
    }

    if (Platform.OS === 'ios') {
      WebBrowser.dismissBrowser();
    }
  };
github expo / examples / with-webbrowser-redirect / app / App.js View on Github external
_handleRedirect = event => {
    WebBrowser.dismissBrowser();

    let data = Linking.parse(event.url);

    this.setState({ redirectData: data });
  };

expo-web-browser

Provides access to the system's web browser and supports handling redirects. On iOS, it uses SFSafariViewController or SFAuthenticationSession, depending on the method you call, and on Android it uses ChromeCustomTabs. As of iOS 11, SFSafariViewController

MIT
Latest version published 3 months ago

Package Health Score

91 / 100
Full package analysis