INNER CODE UNIT · JavaScript
openAuthSessionPolyfillAsync
proyecto26/react-native-inappbrowser · utils.js:135
export async function openAuthSessionPolyfillAsync(
startUrl: string,
returnUrl: string,
options?: InAppBrowserOptions
): Promise<AuthSessionResult> {
invariant(
!_redirectHandler,
'InAppBrowser.openAuth is in a bad state. _redirectHandler is defined when it should not be.'
);
try {
return await Promise.race([
openBrowserAsync(startUrl, options).then(function (result) {
return checkResultAndReturnUrl(returnUrl, result);
}),
waitForRedirectAsync(returnUrl),
]);
} finally {
closeAuthSessionPolyfillAsync();