I´m implementing Firebase authentication in my android project,
Using the example repo of @AlexMamo https://github.com/alexmamo/FirebaseSignInWithGoogle
when an user is already signed in, and is trying to Revoke Access credentials, the next code sentence is executed
db.collection(USERS).document(uid).delete().await()
but it´s always throwing an error from firestore: PERMISION_DENIED
In my firebase console I have enabled the delete option for users:
So I don´t know what´s causing this error.
The complete code file is this: Lane 40 https://github.com/alexmamo/FirebaseSignInWithGoogle/blob/master/app/src/main/java/ro/alexmamo/firebasesigninwithgoogle/data/repository/ProfileRepositoryImpl.kt
I think that your problem is about FireStore Security Rules.
FireStore only set basic rule to let you read and write data in default.
You can check the official document about setting your own security rules in your Firebase Cloud Firestore Console.
About FireStore "Secure your data" Explanation
Create a rule that enables delete access for all users (or all authenticated users)