Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
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;
}
}
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,
});
}
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