Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Firebase Dashboard set email verified

I created a user via the console and inside my client (iOS App) I require the user to have their email verified before they can use it. However the test user does not have a valid email (it does not exist). The email is [email protected].

Is there any way I can set the account as "verified email"? I don't find anything in the console, is it possible to set this status on a user (maybe in a onCreate auth trigger?)?

Thank you

like image 588
Janosch Hübner Avatar asked Sep 09 '18 23:09

Janosch Hübner


1 Answers

There is no option in the Firebase Console to set the emailVerified state of a user. So you'll have to do it in code.

The easiest way to do this is through the Firebase Admin SDK, which is available for Node.js, Java, Python and Go. In Node.js it's as simple as:

admin.auth().updateUser(uid, { emailVerified: true })

You can find the user's UID in the Firebase console.

like image 178
Frank van Puffelen Avatar answered Oct 17 '22 06:10

Frank van Puffelen