Firautherrordomain Code=17014 Error When Deleting from Firebase Auth B/C Not Re-Logged into My iOS App (Swift)

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: on FIRUser.



Related Topics



Leave a reply



Submit