如何获得oobCode本地化的目的 [英] How to get oobCode for localization purpose
问题描述
谢谢。
目前无法通过Firebase身份验证API生成有效的 oobCode
值。它只能被发送(如你所说的不可翻译的)电子邮件。
但是你可以建立自己的电子邮件验证机制,如果你想,使用您自己的确认码来验证电子邮件所有权。您可以:
- 在服务器上生成一个随机的,不可猜测的代码
- 用户的电子邮件地址,然后
- 当用户单击确认链接时,在您回叫的同一台服务器上拥有自己的终点。您可以使用Firebase Admin SDK将
emailVerified
属性设置为true
。
有关最后一步的示例,请参阅: https://firebase.google.com/docs/auth/admin/manage-users#update_a_user
感谢@Nikhil的评论:或者你可以自己完成验证,并使用Admin SDK将 emailVerified
设置为true。有关这方面的例子,请参阅 Firebase文档。 p>
Firebase allows only one language for confirmations emails. Whole nicely done products are useless for multi-language apps. I want to make my own confirmation system. The only question is how can I get this oobCode which is generated inside firebase. site.com?mode=&oobCode=
Thank you.
There is currently no way to generate a valid oobCode
value through the Firebase Authentication API. It can only be sent in the (as you've said "non-translatable") email message.
But you can build your own email verification mechanism if you want, using your own confirmation code to verify email ownership. You'd:
- Generate a random, unguessable code on a server
- Send it to the user's email address and then
- When the user clicks the confirmation link, have your own end point on the same server that you call back to
- At this point you can use the Firebase Admin SDK to set the
emailVerified
property totrue
.
For an example of the last step, see: https://firebase.google.com/docs/auth/admin/manage-users#update_a_user
Thanks to @Nikhil in the comments: Alternatively you can roll your own verification altogether and use the Admin SDK to set emailVerified
to true. See the Firebase documentation for an example of that.
这篇关于如何获得oobCode本地化的目的的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!