Meteor Accounts autologin pattern?

ぐ巨炮叔叔 提交于 2019-12-11 03:36:46

问题


I'm thinking about a sign-up-with-mobile number system whereby someone can register with a mobile number and get a SMS to verify that they exist... at which point I'd like to have them automatically logged in without a password... (the SMS is basically a password)

This is patterned on the Lyft app sign-up, which doesn't ask for a username/password/etc.

But for the life of me, I can't figure out how to do this.

I'm totally fine with a server only Meteor.method which responds with something "secure" but I don't know what that would be now.

The only thing I can think of would be to set the password on the User and then transmit it to the client and run a login (which seems insecure to me).

I have read through this great article https://meteorhacks.com/extending-meteor-accounts.html and it's a good option, but I don't know of a strategy for that which wouldn't bypass security too

(at some point the server has to communicate securely back to the client...)

Recommendations?


回答1:


I made a package that might help you, Meteor accounts phone, which do login based on sms mobile number verification https://github.com/okland/accounts-phone/ Enjoy!



来源:https://stackoverflow.com/questions/25799396/meteor-accounts-autologin-pattern

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