firebase / firebase/firebase-admin-node

Feature Request: Cloud Function should support user.sendEmailVerification() like client sdk

未关闭
#46 69 条评论 86 个 reaction 已指派 1 人 已被 @bojeil-google 认领 在 GitHub 查看
api: auth type: feature request
主要语言
TypeScript
星标
1.7k
派生
419
平均合并
3 天 10 小时
30 天内合并 PR
16

描述

[Refiling for user @sun3 from https://github.com/firebase/functions-samples/issues/181]

Feature Request:

The ```user.sendEmailVerification()``` needs to be supported by Firebase Cloud Functions. This is available in client side but not server side. When using Cloud Functions to create new users we also need to automatically send Email Verification before new user can use our apps. This is currently as stopping block for our apps.

At this point the ```user.sendEmailVerification()``` gives error that function is not found.

```
admin.auth().createUser({
email: emailAddress,
emailVerified: false,
password: password,
displayName: '', //name,
disabled: false
})
.then(function (user) {
// A error representation of the newly created user is returned
console.log("Created Firebase User successfully with id: ", user.uid);
console.log("user.emailVerified:", user.emailVerified);

// Send Email Verification
user.sendEmailVerification()
.then(function (emailSent) {
console.log('emailSent ', emailSent);
})
.catch(function (error) {
console.log('emailSent error ', error);
});

// ... Additional code below
```

Thank you and I am open to any suggestions.

贡献指南

打开贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。