Authentication Manage Users - tuarua/Firebase-ANE GitHub Wiki
The contents of this page are based on the original Firebase Documentation
Update a user's profile
You can update a user's basic profile information—the user's display name and profile photo URL—with the updateProfile() method. For example:
auth.currentUser.updateProfile("FireAceOfBase", "https://cdn0.iconfinder.com/data/icons/user-pictures/100/matureman1-512.png");
Set a user's email address
You can set a user's email address with the updateEmail() method. For example:
auth.currentUser.updateEmail("[email protected]");
Send a user a verification email
You can send an address verification email to a user with the sendEmailVerification() method. For example:
auth.currentUser.sendEmailVerification();
You can customize the email template that is used in Authentication section of the Firebase console, on the Email Templates page. See Email Templates in Firebase Help Center.
It is also possible to pass state via a continue URL to redirect back to the app when sending a verification email.
Additionally you can localize the verification email by updating the language code on the Auth instance before sending the email. For example:
auth.languageCode = "fr";
Set a user's password
You can set a user's password with the updatePassword() method. For example:
auth.currentUser.updatePassword("newpass");
Send a password reset email
You can send a password reset email to a user with the sendPasswordResetEmail() method. For example:
auth.sendPasswordResetEmail("[email protected]");
You can customize the email template that is used in Authentication section of the Firebase console, on the Email Templates page. See Email Templates in Firebase Help Center.
It is also possible to pass state via a continue URL to redirect back to the app when sending a password reset email.
Additionally you can localize the password reset email by updating the language code on the Auth instance before sending the email. For example:
auth.languageCode = "fr";
You can also send password reset emails from the Firebase console.
Delete a user
You can delete a user account with the remove() method. For example:
auth.currentUser.remove();
You can also delete users from the Authentication section of the Firebase console, on the Users page.
Re-authenticate a user
Some security-sensitive actions—such as deleting an account, setting a primary email address, and changing a password—require that the user has recently signed in. If you perform one of these actions, and the user signed in too long ago, the action fails with the AuthErrorCode.CREDENTIAL_TOO_OLD error. When this happens, re-authenticate the user by getting new sign-in credentials from the user and passing the credentials to reauthenticate. For example:
var credential:AuthCredential;
auth.currentUser.reauthenticate(credential);