How To Resend Verification Email

Hello,

Is there a way to resend the verification email?

I have a number of users that didn’t receive their email verification when signing-up. They checked their junk folder and didn’t find it. I guess this happens sometimes. I don’t want them to get stuck so I want to provide an option for them to resend the verification email. The only option I found is to reset their password so it will send another email but is not the best solution as some of them don’t really want to use a different password. Is there a way to just resend the verification email?

Thanks,
Marco

I had a similar issue in that I wanted users to be able to reset their password, but Thunkable does not have a block for reset password.

I discovered you can use the WebAPI block to call all sorts of Firebase commands. The example below resets the password (which is what I wanted, but not exactly what you want). Check out the Firebase documentation for the WebAPI commands Firebase Auth REST API

1 Like

Thunkable has reset password option in the signIn block.

But is there a way to resend verification email?

Yes, use the blocks I listed above and modify the using the instructions at https://firebase.google.com/docs/reference/rest/auth#section-send-email-verification

1 Like

Awesome! I will try that out. Thanks so much!

Hi

Have others have been able to use the Web API successfully to send an email verification? I have used @drted’s blocks as a base and the Firebase instructions but I get an error 400 (Invalid ID token). For the ID token I have used the userid returned from the firebase login block. I do not know what else to use to make this work.

My blocks are attached (I have removed my firebase API key).

Can anyone help?

I have still not been able to solve this problem (see my message above).

If it is not possible to re-send a verification email within Thunkable using DrTed’s method, is there a way for me to re-send a verification email within Firebase itself? I see some references in the Firebase documentation to using a CLI to do this, but I have no idea at all how to do this.

Please help! I receive a few requests from users about not receiving a verification email and I am not able to help them apart from asking them to try setting up a new account.

Thanks.

1 Like

Have you used the reset password Thunkable block?

I’m able to resend verification form my Thunkable app using a webapi. I’ll post it here soon when I get to my laptop.

2 Likes

Hey @maptheunknown, Please share! I’ve started looking into a google app script / JavaScript solution for this. A straight rest API cal to the Firebase endpoint would be ideal if it exits!

Here’s the code I use to Resend Verification Email

  1. You need to get the user’s userIDToken first.
    https://identitytoolkit.googleapis.com/v1/accounts:signInWithPassword?key=[firebaseKey]

  2. Then call the WebAPI post to resend the verification email.
    https://identitytoolkit.googleapis.com/v1/accounts:sendOobCode?key=[firebaseKey]

Screenshot below

2 Likes

I use this block and it works all the time without any Web API calls.

image

The Reset Password block will send an email to the email address which can be used in place of the verification email if required.

2 Likes

light switch moment! How did we overlook this issue? Now reading this I feel I may have seen this before.

If this works, we should call this closed and I’ll add it to the documentation for Firebase!

1 Like

But reset password is a very different use case than resend verification email. Users don’t want to change their password especially if they just signed-up.

3 Likes

maybe we’re looking at?

Easy workaround

and

Block based workaround

This is from Firebase documentation. There is enough room in the reset password command to give your own customized URL or use a customized email template for this task.

[Edit]

Just reading further, I got this

In any case, if you want to continue using the API then you need to move to Google Cloud Platform to avoid the discontinuation of such API any time in the future as said in the documentation.

1 Like

just in line with my upcoming tutorials :wink: :wink:

1 Like

Thanks @muneer and @maptheunknown for these solutions, which I will try to implement.

1 Like

I had a question about the Google Cloud Platform migration - will @maptheunknown’s Web API solution for re-sending email verification stop working as a result of this migration? I don’t want to include it in my app if it may stop working at some point.

1 Like