Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Return results with signup success callback #1799

Merged
merged 6 commits into from
Feb 14, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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