invertase / invertase/react-native-firebase

[📚] Documentation Issue - Revoke Access Token

Open
#8,703 7 comments 1 reaction 0 assignees View on GitHub
Needs Attention plugin: authentication type: documentation type: enhancement
Dominant language
TypeScript
Stars
12.3k
Forks
2.3k
Avg merge
3d 3h
Merged PRs (30d)
79

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:

```ts
/**
* 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;
```

---

### **Suggested Fix**

The docs should be updated to reflect the correct method name (`revokeAccessToken`).

```ts
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);
}

```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.