Matt South
Matt South

Reputation: 141

Passwordless account generation in Meteor

I'd like people to be able to initially use a meteor app without explicitly creating an account until such time as they wished to share their data or see their data on another device. Even when they were happy to explicitly create an account, I'd like the option for that user account to be passwordless (i.e. https://passwordless.net/).

But I'm struggling at the first hurdle. How do I check that a user account doesnt already exist and create one if necessary?

Upvotes: 3

Views: 306

Answers (2)

codingforworlddomination
codingforworlddomination

Reputation: 1139

In case someone else stumbles upon this: Meteor has since released its own password-less solution: https://docs.meteor.com/packages/accounts-passwordless

meteor add accounts-passwordless and then follow the instructions in the documentation (link above).

Upvotes: 0

alanning
alanning

Reputation: 5217

There are a few packages which look promising:

If neither of those are exactly what you want then they should at least provide a good starting point.

An alternate would be to use accounts-password and automatically create a unique user account for the guest once they perform some important action so you can store their data. Store the login credentials for that account in localStorage (or a cookie). Then once they are ready to signup, move their data from their temp account to their real account and delete the temp one.

Upvotes: 0

Related Questions