FIRAuthErrorDomain Code=17014 error when deleting from firebase auth b/c not re-logged into my iOS app (swift)?
This is done for security reasons. Reauthentication is a sensitive operation. Same as when you try to update your password (you need to enter the old one), update your email, update a credit card, shipping address for an e-commerce app, etc. It may not be convenient but it is necessary for the user's security.
For good practice, you should enforce this. However, if you need to delete a user from your server, you can always use Admin SDK admin.auth().deleteUser(uid)
API: https://firebase.google.com/docs/auth/admin/manage-users#delete_a_user
Separately, you need to either reload
the user or try to refresh the token getIDToken
to force it to detect the deletion of the user.
firebase error when deleting user account This operation is sensitive and requires recent authentication. Log in again before retrying this request.
For certain sensitive operations (such as changing the user's password, or deleting the user account), Firebase requires that the user has recently signed in. If the user hasn't signed in recently when you try to perform such an operation, Firebase throws the exception you get.
When you get this exception, you should ask the user to re-enter their credentials, and retry the operation.
From the documentation on handling errors:
[Deleting a user account] is a security sensitive operation that requires a recent login from the user. This error indicates the user has not signed in recently enough. To resolve, reauthenticate the user by invoking
reauthenticateWithCredential:completion:
onFIRUser
.
Related Topics
How to Convert String to Date Without Time in Swift 3
Saving And/Or Querying User Display Names in Firebase Using Caseinsensitive
Swiftui Navigationview Not See Image
What Is The Advantage of Closure Stored Property Initialisation
Uitextfield with a Placeholder Containing an Image and Text
What's The Difference Between Nsusernotification and Unusernotification in Macos
Animate UIlabel Width with Fixed Center
Does Realm Support Computed Property in Swift
How to Do Imageview.Startanimating() with Completion in Swift
Firestore - Creating a Copy of a Collection
Calculate Range of String from Word to End of String in Swift
How to List All Available Patterns in a Scdynamicstorage
How to Save Re-Ordered Tableview Cells to Core Data
Swift Janus Can Not Publish Video, But Get Remote Video Successful - Can Not Know Reason
Get Url from Open Dialog of Standard Swift Document-Based Application