1

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.

TheRyan722
  • 1,029
  • 13
  • 37

1 Answers1

6

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.

TheRyan722
  • 1,029
  • 13
  • 37
  • Could you please clarify this a little? I have managed to get the sign-in link created and sent to the user but for the life of me I can't find a server-side method/endpoint to actually login that user! There is absolutely nothing in the admin sdk to actually sign the user in without a password. Nothing in the REST api either. – Yigit Erol Nov 09 '19 at 13:04
  • @YigitErol well you don't need them to sign in using the admin sdk, you can generate an id token from the client side auth sdk and send that as a proof of authentication , more on that here https://firebase.google.com/docs/auth/admin/verify-id-tokens – Vaibhav Chopra Aug 24 '21 at 07:17