Meteor Custom Accounts createUser with multiple parameters for user -


i trying user registration process in meteor . looked @ meteor accounts-password package , handle pretty required logic. app ,i struggling on following 2 points ----

1 . accounts-password api named accounts.createuser takes limited parameters -- username , email , password registering user . requiring other fields mobile_number , first_name, last_name, address completing user registration creatuser . mobile number used send otp verify user's mobile . email verification , meteor . how can multiple parameters based create user executed using accounts-password api's.

2 . accounts-password api named accounts.loginwithpassword takes email , username , password login . in app , user enter either email or mobile_number 1 input , password second input , , based on , need verify user , log him in app . how can mobile number based loggingin included ?

i've had similar use case had build system users mobile numbers , no email ids.

  1. use profile field store additional information. when user created, generate otp , send mobile number through sms gateway. handle otp confirmation through separate form. (make sure otp not published user).

  2. store mobile number user name, way when user keys in mobile/email, meteor.loginwithpassword check both username/email.

hope above helps.


Comments

Popular posts from this blog

angularjs - ADAL JS Angular- WebAPI add a new role claim to the token -

php - CakePHP HttpSockets send array of paramms -

node.js - Using Node without global install -