invertase / invertase/react-native-firebase
[📚] Documentation Issue - Revoke Access Token
- 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
Assessment
This issue has not been assessed yet.