How to use the expo-web-browser.openAuthSessionAsync 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 expo / expo / packages / expo / build / AuthSession.js View on Github external
async function _openWebBrowserAsync(startUrl, returnUrl) {
    // $FlowIssue: Flow thinks the awaited result can be a promise
    let result = await openAuthSessionAsync(startUrl, returnUrl);
    if (result.type === 'cancel' || result.type === 'dismiss') {
        return { type: result.type };
    }
    return result;
}
function getStartUrl(authUrl, returnUrl) {
github Marwan01 / food-converter / node_modules / expo / build / AuthSession.js View on Github external
async function _openWebBrowserAsync(startUrl, returnUrl) {
    // $FlowIssue: Flow thinks the awaited result can be a promise
    let result = await openAuthSessionAsync(startUrl, returnUrl);
    if (result.type === 'cancel' || result.type === 'dismiss') {
        return { type: result.type };
    }
    return result;
}
function getStartUrl(authUrl, returnUrl) {
github expo / expo / packages / expo / src / AuthSession.ts View on Github external
async function _openWebBrowserAsync(startUrl, returnUrl) {
  // $FlowIssue: Flow thinks the awaited result can be a promise
  let result = await openAuthSessionAsync(startUrl, returnUrl);
  if (result.type === 'cancel' || result.type === 'dismiss') {
    return { type: result.type };
  }

  return result;
}
github joehoyle / vienna / components / Setup / InstallConnect.js View on Github external
} );

		// First, determine whether the site is multisite or not.
		const multisite = await this.multisiteCheck;

		// Prepare the browser.
		const baseUrl = url.replace( /\/$/, '' ) + '/wp-admin';
		const adminUrl = new URI( multisite ? baseUrl + '/network/plugin-install.php' : url + '/plugin-install.php' );
		const installUrl = adminUrl.addQuery( {
			tab: 'search',
			type: 'term',
			s: 'connect'
		} );

		// Open the browser and wait.
		openAuthSessionAsync( '' + installUrl ).then( this.onCheck );
	}

expo-web-browser

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

MIT
Latest version published 1 month ago

Package Health Score

95 / 100
Full package analysis