Skip to content
New issue

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

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

Already on GitHub? # to your account

Lock blank after # #216

Closed
schamp opened this issue Jun 21, 2016 · 6 comments
Closed

Lock blank after # #216

schamp opened this issue Jun 21, 2016 · 6 comments

Comments

@schamp
Copy link

schamp commented Jun 21, 2016

I have # enabled, and it works correctly, however, after the user submits the built-in email/password # form, the widget goes blank -- there's no message about whether # was successful or not, or instructions about what to do next:
screen shot 2016-06-21 at 6 17 14 am

Looking at the document elements, it appears that the entire auth0-login-form element is empty:
screen shot 2016-06-21 at 6 50 40 am

Is there something I must set to show a message after #? It is not clear to me yet whether it is a problem with the WP plugin or Lock itself. In my perfect world, I can customize the text of that message by a parameter to the lock widget. But I was unable to find anything about this issue in the documentation.

@glena
Copy link
Contributor

glena commented Jun 21, 2016

mm That is weird.

Is there any js error in the console?
If you go to the logs section in the dashboard, does it shows any error? does it shows a successfull # + login? (it shoulid be two different logs).

can you attach a har file of the whole interaction? (start capturing before you go to the # page ultil you get the empty # box).
Follow this to create the har file http://auth0.com/docs/har

Thx

@schamp
Copy link
Author

schamp commented Jun 21, 2016

No I do have a successful # action in the log. There is no successful login, but that is expected: I have lock configured with { loginAfter#: false } in the Advanced plugin Lock config setting. If I disable that, after # and autologin, I see:
screen shot 2016-06-21 at 7 04 17 am

I can make this work for me, but see the attached har exemplifying the problem for me:
local.wordpress.dev-full.har.txt

@glena
Copy link
Contributor

glena commented Jun 21, 2016

ohh makes sense now.

This is because of the { loginAfter#: false }.

You should be able to hook to the # success event (check https://auth0.com/docs/libraries/lock/events).

You can add the needed js to the Customize the Login Widget with custom JS field under the appearance tab.

@schamp
Copy link
Author

schamp commented Jun 21, 2016

Gotcha, I'll try that, thanks.

@schamp
Copy link
Author

schamp commented Jun 21, 2016

In case anyone is interested, I settled on this custom CSS in the 'Customize the Login Widget CSS' setting:

#auth0-login-form {
  position: relative;
}

##-msg {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  padding: 0px 24px;
}

and this custom JS in the 'Customize the Login Widget with custom JS' setting:

// called every time triggered
lock.on('# success', function() {
   var msg = jQuery('<div id="#-msg">You have signed up successfully.  ' +
      'Once you have verified your email address ' +
      'and an admin has activated your account, ' +
      'you will be able to log in.</div>');

  jQuery('#auth0-login-form')
    .append(msg);
});

@schamp schamp closed this as completed Jun 21, 2016
@glena
Copy link
Contributor

glena commented Jun 21, 2016

good :)

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 19, 2022
# for free to subscribe to this conversation on GitHub. Already have an account? #.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants