Skip to content

Commit 15eb457

Browse files
authored
docs(auth): add Android access token revocation guide (#18215)
1 parent cb6b4ae commit 15eb457

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

docs/auth/federated-auth.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -284,6 +284,16 @@ Future<UserCredential> signInWithApple() async {
284284
}
285285
```
286286

287+
On Android platforms, obtain the access token then revoke the token using the
288+
`revokeAccessToken()` API.
289+
290+
```dart
291+
// Keep the access token returned from Android platforms
292+
String? accessToken = userCredential.credential?.accessToken;
293+
// Revoke the access token
294+
await FirebaseAuth.instance.revokeAccessToken(accessToken!);
295+
```
296+
287297
## Apple Game Center (Apple only) {:#games}
288298

289299
Ensure the "Game Center" sign-in provider is enabled on the [Firebase Console](https://console.firebase.google.com/project/_/authentication/providers).

0 commit comments

Comments
 (0)