Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var user = new StackMob.User({ username: 'Chuck Norris' });
- user.forgotPassword();
- //after checking getting his temp password in his email...
- user.loginWithTempAndSetNewPassword('temporary password from StackMob email', 'mysuperfists');
- ...
- StackMob.getLoggedInUser(); //returns 'Chuck Norris'
- //StackMob will log the user in with the temporary password and then give the user a new password: 'mysuperfists' for future logins
Add Comment
Please, Sign In to add comment