You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 */exportdeclarefunctionrevokeAccessToken(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';asyncfunctionrevokeSignInWithAppleToken(){// Request a refresh (authorizationCode) from Appleconst{ authorizationCode }=awaitappleAuth.performRequest({requestedOperation: appleAuth.Operation.REFRESH,});if(!authorizationCode){thrownewError('Apple revocation failed — no authorizationCode returned');}// Revoke the tokenreturnrevokeAccessToken(getAuth(),authorizationCode);}
revokeToken is accessible using the declerative API.
The modular API (using revokeAccessToken) throws an error (only supported in Web).
This is my current implementation (working on iOS devices).
import{AppleAuthProviderasAppleProvider,signInWithCredential,}from"@react-native-firebase/auth";import{AppleAuthenticationScope,signInAsyncassignInWithApple,refreshAsync,}from"expo-apple-authentication";
...
/** * Authentication provider for Apple sign-in. */classAppleAuthProviderextendsBaseAuthProviderimplementsIRevokableAuthProvider{/** * The type of this authentication provider. */readonlytype=ProviderType.APPLE;/** * Signs in the user using Apple authentication. * * @async * @returns {Promise<UserCredential>} Promise that resolves to the * authenticated user's credentials. * @throws Apple sign-in failed. */asyncsignIn(): Promise<UserCredential>{try{constnonce=awaitgenerateNonce();// Start the sign-in requestconst{ identityToken }=awaitsignInWithApple({requestedScopes: [AppleAuthenticationScope.EMAIL,AppleAuthenticationScope.FULL_NAME,],nonce: nonce.hashed,});if(!identityToken){thrownewAuthError("No identify token returned");}// Create a Firebase credential from the responseconstappleCredential=AppleProvider.credential(identityToken,nonce.raw);returnsignInWithCredential(this.auth,appleCredential);}catch(err: unknown){thrownewAuthError(`Apple sign-in failed: ${(errasError).message}`);}}/** * Permanently revokes the user's access token with Apple and Firebase. * After revocation, the user will need to re-authenticate completely. * * This is useful for account deletion or when users want to fully disconnect * their Apple ID from the app. * * @async * @returns {Promise<void>} * @throws Apple token revocation failed. */asyncrevokeToken(): Promise<void>{try{constappleId=this._getAppleId();// Get an authorization code from Appleconst{ authorizationCode }=awaitrefreshAsync({user: appleId});// Ensure Apple returned an authorization codeif(!authorizationCode){thrownewAuthError("No authorization code returned");}// Revoke the tokenreturnthis.auth.revokeToken(authorizationCode);}catch(err: unknown){thrownewAuthError(`Apple revocation failed: ${(errasError).message}`);}}/** * Extracts the Apple ID from the current user. * * @returns {string} * @throws No Apple ID found for the current user. */private_getAppleId(): string{constproviders=this.auth.currentUser?.providerData;constappleProvider=providers?.find(({ providerId })=>providerId==="apple.com");constappleId=appleProvider?.uid;if(!appleId){thrownewAuthError("No Apple ID found for the current user");}returnappleId;}}exportdefaultAppleAuthProvider;
revokeToken and revokeAccessToken are both different methods. revokeToken (which is what you want and are using on the deprecated API accepts an authorization code whilst revokeAccessToken is web only and accepts the access token. Neither methods are implemented on the Modular API but will look into getting them setup.
changed the title [-][📚] Documentation Issue - Revoke Access Token[/-][+][Enhancement] Revoke Access Token not implemented yet on Modular API (only on Namespaced)[/+]on Sep 22, 2025
changed the title [-][Enhancement] Revoke Access Token not implemented yet on Modular API (only on Namespaced)[/-][+][Docs] Revoke Access Token not implemented yet on Modular API (only on Namespaced)[/+]on Sep 22, 2025
changed the title [-][Docs] Revoke Access Token not implemented yet on Modular API (only on Namespaced)[/-][+][📚] Documentation Issue - Revoke Access Token[/+][/+]on Sep 22, 2025
Hello 👋, to help manage issues we automatically close stale issues.
This issue has been automatically marked as stale because it has not had activity for quite some time.Has this issue been fixed, or does it still require attention?
This issue will be closed in 15 days if no further activity occurs.
Just checking if there's any traction on this. Running into issues making revokeToken work and came across this when trying to rule out any problems that weren't on my side. I saw that the related pull request has been pending for a while.
Hello 👋, to help manage issues we automatically close stale issues.
This issue has been automatically marked as stale because it has not had activity for quite some time.Has this issue been fixed, or does it still require attention?
This issue will be closed in 15 days if no further activity occurs.
Activity
[-][📚] Documentation Issue Title - Revoke Access Token[/-][+][📚] Documentation Issue - Revoke Access Token[/+]victoriomolina commentedon Sep 19, 2025
revokeTokenis accessible using the declerative API.The modular API (using
revokeAccessToken) throws an error (only supported in Web).This is my current implementation (working on iOS devices).
MichaelVerdon commentedon Sep 22, 2025
revokeToken and revokeAccessToken are both different methods. revokeToken (which is what you want and are using on the deprecated API accepts an authorization code whilst revokeAccessToken is web only and accepts the access token. Neither methods are implemented on the Modular API but will look into getting them setup.
[-][📚] Documentation Issue - Revoke Access Token[/-][+][Enhancement] Revoke Access Token not implemented yet on Modular API (only on Namespaced)[/+][-][Enhancement] Revoke Access Token not implemented yet on Modular API (only on Namespaced)[/-][+][Docs] Revoke Access Token not implemented yet on Modular API (only on Namespaced)[/+][-][Docs] Revoke Access Token not implemented yet on Modular API (only on Namespaced)[/-][+][📚] Documentation Issue - Revoke Access Token[/+][/+][-][📚] Documentation Issue - Revoke Access Token[/+][/-][+][📚] Documentation Issue - Revoke Access Token[/+]victoriomolina commentedon Sep 25, 2025
yep, docs are a little confusing regarding token revokation.
MichaelVerdon commentedon Sep 29, 2025
Will make sure this is addressed upon the release of our newer docs page thanks for submitting this and here in the meantime.
github-actions commentedon Oct 27, 2025
Hello 👋, to help manage issues we automatically close stale issues.
This issue has been automatically marked as stale because it has not had activity for quite some time.Has this issue been fixed, or does it still require attention?
Thank you for your contributions.
edyhu commentedon Dec 3, 2025
Just checking if there's any traction on this. Running into issues making revokeToken work and came across this when trying to rule out any problems that weren't on my side. I saw that the related pull request has been pending for a while.
github-actions commentedon Jan 1, 2026
Hello 👋, to help manage issues we automatically close stale issues.
This issue has been automatically marked as stale because it has not had activity for quite some time.Has this issue been fixed, or does it still require attention?
Thank you for your contributions.