How to create stormpath user without password? -


some users of our application admins. want give them capability create new users. think following flow:

  1. admin goes "users" page , clicks "create new user" button , fill new user's name , email address.
  2. that new user retrieves email acknowledge user created in our application.
  3. the user clicks link email body , proceeds "set password" page , specify password.

is possible achieve such flow angular + express? there other possible flows can achieved?

you can create invite-based flow, you'll have custom work our libraries.

you'll need work stormpath client , stormpath application directly, these provided stormpath node sdk. inside of express middleware, retrieve client with:

var stormpathclient = req.app.get('stormpathclient')

and application with:

var stormpathapplication = req.app.get('stormpathapplication`)

on application, use stormpathapplication.createaccount() create user. when pass new account data, set password long, random, , un-guessable. if stormpath directory has email verification enabled, user invite email. email should link them angular application, custom view read email verification token url , post custom middleware on server. middleware need use stormpathclient.verifyaccountemail() verify token.

then can collect new password user, , save setting req.user.password='new password', calling req.user.save().

hope helps! work @ stormpath , maintainer of these libraries :)


Comments

Popular posts from this blog

java - pagination of xlsx file to XSSFworkbook using apache POI -

Unlimited choices in BASH case statement -

apache - How do I stop my index.php being run twice for every user -