Skip to content

Commit

Permalink
Return results with signup success callback (auth0#1799)
Browse files Browse the repository at this point in the history
* updated lock to have signup success

* updated version

* updated package name

* updated entity reference

* small readme fix
  • Loading branch information
bstaley authored and jfromaniello committed Mar 5, 2020
1 parent e780367 commit 085a7b7
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -156,8 +156,8 @@ Lock will emit events during its lifecycle.
- `forgot_password submit`: emitted when the user clicks on the submit button of the "Forgot password" screen.
- `signin submit`: emitted when the user clicks on the submit button of the "Login" screen.
- `signup submit`: emitted when the user clicks on the submit button of the "Sign up" screen.
- `signup success`: emitted when the user successfully signs up.
- `signup error`: emitted when signup fails. Has the error as an argument.
- `signup success`: emitted when signup succeeds. Has the error as an argument.
- `federated login`: emitted when the user clicks on a social connection button. Has the connection name and the strategy as arguments.
- `sso login`: emitted when the user clicks on an enterprise SSO connection button. Has the lock ID, connection object, and field name as arguments.

Expand Down
2 changes: 1 addition & 1 deletion src/connection/database/actions.js
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ export function signUp(id) {
function signUpSuccess(id, result, popupHandler) {
const lock = read(getEntity, 'lock', id);

l.emitEvent(lock, 'signup success');
l.emitEvent(lock, 'signup success', result);

if (shouldAutoLogin(lock)) {
swap(updateEntity, 'lock', id, m => m.set('signedUp', true));
Expand Down
1 change: 1 addition & 0 deletions support/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ <h1 class="navbar-brand">
'forgot_password submit',
'signin submit',
'signup submit',
'signup success',
'socialOrPhoneNumber submit',
'socialOrEmail submit',
'vcode submit',
Expand Down

0 comments on commit 085a7b7

Please sign in to comment.