Closed kakarlus closed 7 years ago
i tried one of the codes that you have for auth on email, i can't get a value in the json that says the user is unverified.
Hi,
I have updated the following example EmailLogin.mxml
I tried all the functions and had no problem resetting my password and verifying my email.
Please take a look at it and tell if that solved your issue.
Sorry i wasn't so clear, i meant the verify email works, but the user can still login even if he never clicked the link to verify in his email.
Ah, no problem.
In this case you need to do the following:
First, open this link
Let the users log in, then use the Get Account info function to grab the latest information about their profile.
In the response from Get Account Info there's a key named emailVerified with a boolean value.
If the value is true, you let them through, if not you tell them to verify their account and don't proceed to your app content.
Oh OK thanks for the clarification, i was expecting it to be in the json that returns right after a user logs in.
snippet from: https://firebase.google.com/docs/auth/custom-email-handler
switch (mode) { case 'resetPassword': // Display reset password handler and UI. handleResetPassword(auth, actionCode); break; case 'recoverEmail': // Display email recovery handler and UI. handleRecoverEmail(auth, actionCode); break; case 'verifyEmail': // Display email verification handler and UI. handleVerifyEmail(auth, actionCode); break; default: // Error: invalid mode. }