1
votes

Considering the new email verification templates & mechanism in V3

I have a single page javascript application. As such using an email verification link does not work well for me as I don't want the link from the user's email to open a separate page.

Is there a way for the verification email to instead of the https://domain.com/acctmgmt?mode=<action>&oobCode=<code> to contain simply the oobCode ?

I can then ask the user to paste this code from the email into my application. Basically what I need is something like a %oobCode% email parameter.

Or am I missing the point and there is a better way to do email verification in a single page javascript application ? will the sendEmailVerification resolve once applyActionCode was called in another page ? the docs are unclear about that.

is there any example of using sendEmailVerification and applyActionCode ? I don't understand the sequence of api calls needed

thx!

1

1 Answers

1
votes

The code is usually quite long. It is possible the user could open the link on a different device too. Also there are multiple type of operations (reset password, verify email, etc). You will need to be able to differentiate them from each other. Copying and pasting may not be convenient. That said, you could specify your own landing page for the action code processing in the Firebase Console: https://firebase.corp.google.com/project/$PROJECT_NAME/authentication/emails In that page you can parse the code from the url and display it and tell the user to copy and paste it into your single page app. Furthermore, documentation to help you build your own custom code handler page will be provided soon.