How to use the expo-app-auth.revokeAsync function in expo-app-auth

To help you get started, we’ve selected a few expo-app-auth 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 / apps / native-component-list / src / screens / AppAuthScreen.tsx View on Github external
async function signOutAsync({ accessToken }: { accessToken: string }) {
  try {
    await AppAuth.revokeAsync(config, {
      token: accessToken,
      isClientIdProvided: true,
    });
    await AsyncStorage.removeItem(StorageKey);
    return;
  } catch (error) {
    alert('Failed to revoke token: ' + error.message);
    return;
  }
}
github expo / expo / packages / expo-google-app-auth / src / Google.ts View on Github external
export async function logOutAsync({
  accessToken,
  ...inputConfig
}: GoogleLogInConfig & { accessToken: string }): Promise {
  const guid = getPlatformGUID(inputConfig);

  const clientId = `${guid}.apps.googleusercontent.com`;

  const config = {
    issuer: 'https://accounts.google.com',
    clientId,
  };

  return await AppAuth.revokeAsync(config, {
    token: accessToken,
    isClientIdProvided: !!clientId,
  });
}
github expo / expo / packages / expo-google-app-auth / build / Google.js View on Github external
export async function logOutAsync({ accessToken, ...inputConfig }) {
    const guid = getPlatformGUID(inputConfig);
    const clientId = `${guid}.apps.googleusercontent.com`;
    const config = {
        issuer: 'https://accounts.google.com',
        clientId,
    };
    return await AppAuth.revokeAsync(config, {
        token: accessToken,
        isClientIdProvided: !!clientId,
    });
}
//# sourceMappingURL=Google.js.map

expo-app-auth

Deprecated Expo module for interfacing with the OpenID library AppAuth

MIT
Latest version published 3 years ago

Package Health Score

36 / 100
Full package analysis

Similar packages