-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Open
Labels
Needs Attentionplugin: authenticationFirebase AuthenticationFirebase Authenticationtype: documentationtype: enhancementImplements a new FeatureImplements a new Feature
Description
URL: https://rnfirebase.io/auth/social-auth#apple
Problem
In the "Revoke token" section, the documentation references a revokeToken method, which no longer exists in the latest version of the library.
Instead, the current API exposes the following method:
/**
* Revoke the given access token. Currently only supports Apple OAuth access tokens.
* @param auth
* @param token
*/
export declare function revokeAccessToken(auth: Auth, token: string): Promise<void>;
Suggested Fix
The docs should be updated to reflect the correct method name (revokeAccessToken
).
import { getAuth, revokeAccessToken } from '@react-native-firebase/auth';
import { appleAuth } from '@invertase/react-native-apple-authentication';
async function revokeSignInWithAppleToken() {
// Request a refresh (authorizationCode) from Apple
const { authorizationCode } = await appleAuth.performRequest({
requestedOperation: appleAuth.Operation.REFRESH,
});
if (!authorizationCode) {
throw new Error('Apple revocation failed — no authorizationCode returned');
}
// Revoke the token
return revokeAccessToken(getAuth(), authorizationCode);
}
Metadata
Metadata
Assignees
Labels
Needs Attentionplugin: authenticationFirebase AuthenticationFirebase Authenticationtype: documentationtype: enhancementImplements a new FeatureImplements a new Feature