I'm trying to create a demo account for my app, so that I can submit it to the iOS App Store. The app requires that your email be verified before you can use it. However, the verification emails are not coming into my [email protected] inbox, and so I cannot verify the account. Is there any way I can manually set that firebase account as verified? Thanks
This works as a cloud function.
I add the userid as a key to a child called force with any value and it triggers this function that authenticates the email.
you also must include
const admin = require('firebase-admin');
cloud function
exports.forceQue = functions.database.ref('/force/{uid}').onWrite((data,context) => {
if (!data.after.exists()) {
return false;
}
const uid = context.params.uid;
admin.auth().updateUser(uid, {emailVerified: true});
return true;
});
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With