Skip to content

[📚] Documentation Issue - Revoke Access Token #8703

@victoriomolina

Description

@victoriomolina

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

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions