Firebase admin how to create user with passwordless signin?

自作多情 提交于 2021-01-05 09:46:17

问题


I am looking at the following docs to create a user using the Node.js Firebase admin SDK: https://firebase.google.com/docs/auth/admin/manage-users#create_a_user

However, I want to create a user with passwordless (email link) sign-in, not with a password. Is this possible?

What happens if I don't specify a password for the user?

My web-app currently uses passwordless signin, so it works normally.


回答1:


I just tested and figured it out. If you don't set a password for the user, the user will not have any sign in methods set for them (asside from creating a custom token from the admin SDK and signing in with that).

However if you then send an email sign-in link for the user, and they sign in through the link, it will add the passwordless method to their account.



来源:https://stackoverflow.com/questions/57778372/firebase-admin-how-to-create-user-with-passwordless-signin

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!