PhantomAppDevelopment / firebase-as3

Integrate Firebase Auth, Realtime Database and Storage in your Adobe AIR projects.
MIT License
55 stars 12 forks source link

requestType strings have changed #11

Closed kakarlus closed 7 years ago

kakarlus commented 7 years ago

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. }

kakarlus commented 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.

agentphantom commented 7 years ago

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.

kakarlus commented 7 years ago

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.

agentphantom commented 7 years ago

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.

kakarlus commented 7 years ago

Oh OK thanks for the clarification, i was expecting it to be in the json that returns right after a user logs in.