Revoke Apple account access in Android using Firebase

406 Views Asked by At

I have implemented apple account authentication in Android by using Firebase

https://firebase.google.com/docs/auth/android/apple

We have to revoke the access for apple account in our application. For iOS, authorisation code can be fetched from Firebase/apple SDK and can revoke the access by using JWT code. Below is the reference link

https://github.com/jooyoungho/apple-token-revoke-in-firebase

In Android, we can get only Firebase Auth Token ID.

How can we fetch authorisation code for Android apple account sign in or do we have any other way to revoke the access/tokens from apple signin account by using Firebase.

1

There are 1 best solutions below

1
Dennis Alund On

As I understand it, you want to keep the user account with one or more other sign-in methods and only unlink the user's Apple sign-in.

This might be what you are looking for: https://firebase.google.com/docs/auth/android/account-linking#unlink-an-auth-provider-from-a-user-account

FirebaseAuth
  .getInstance()
  .getCurrentUser()
  .unlink("apple.com");