INNER CODE UNIT · JavaScript

checkResultAndReturnUrl

proyecto26/react-native-inappbrowser · utils.js:86

async function checkResultAndReturnUrl(
  returnUrl: string,
  result: AuthSessionResult
): Promise<AuthSessionResult> {
  if (Platform.OS === 'android' && result.type !== 'cancel') {
    try {
      await handleAppStateActiveOnce();
      const url = await Linking.getInitialURL();
      return url && url.startsWith(returnUrl) ? { url, type: 'success' } : result;
    } catch {
      return result;
    }
  } else {
    return result;
  }
}

export async function openBrowserAsync(

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…