-
Notifications
You must be signed in to change notification settings - Fork 96
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
A0 widget #16
Conversation
we need to update to lock github.com/auth0/lock On Thu, Sep 25, 2014 at 9:59 PM, Germán Lena notifications@github.com
|
Just to double check: Right now it is loading //cdn.auth0.com/w2/auth0-widget-5.min.js and it should be changed to //cdn.auth0.com/js/lock-6.min.js and initialices the widget in this way: var widget = new Auth0Widget({
domain: '<?php echo $domain; ?>',
chrome: true,
clientID: '<?php echo $client_id; ?>',
callbackURL: '<?php echo site_url('/index.php?auth0=1'); ?>',
container: 'auth0-login-form',
state: '<?php echo $state; ?>',
showSignup: <?php echo $allow_signup?'true':'false' ?>,
dict: { signin: { title: '<?php echo $title ?>' } }
});
widget.signin({
onestep: true,
theme: 'static',
standalone: true,
showIcon: <?php echo ($show_icon ? 'true' : 'false'); ?>,
icon: '<?php echo ($show_icon ? WP_Auth0_Options::get('icon_url') : ''); ?>'
}, callback); It should be changed in this way: The domain and clientID are the parameters when Auth0Lock is initialized. Then to show the withget should I use showSignin or show depending if "allow signup" is enabled. The options are:
What about this options?
I'm missing something? |
yep that's pretty much all. there is a migration guide in the wiki On Thu, Sep 25, 2014 at 10:31 PM, Germán Lena notifications@github.com
|
ok, ready with lock. should I update the readme with the widget, shortcode usage and the WP legacy login? |
yes that would be great. also the short code should be parametrizable On Fri, Sep 26, 2014 at 12:04 AM, Germán Lena notifications@github.com
|
Right now, both widget and shortcode is using the same settings as the login page. Do you want to add a different configuration for each one? (or I'm misunderstanding how it should be parametrizable) |
Maybe someone wants to put the widget in a page with w different On Fri, Sep 26, 2014 at 11:02 AM, Germán Lena notifications@github.com
|
fix grafico
fix grafico
@@ -345,6 +428,14 @@ private static function login_user( $userinfo, $data ){ | |||
|
|||
public static function wp_init(){ | |||
self::setup_rewrites(); | |||
|
|||
$cdn_url = WP_Auth0_Options::get('cdn_url'); | |||
if (strpos($cdn_url, 'auth0-widget-5') !== false) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How will we be able to update Lock version as well in every future WP update if we want? Something like this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is to upgrade from auth0-widget-5 to lock. Right now, it is tied to lock-6.min.js and will be updated until the next major release.
If we want to force the update, I added an internal version counter (other than the AUTH0_DB_VERSION) to manage the settings updates.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great!
Martin Gontovnikas
Software Engineer
Buenos Aires, Argentina
Twitter: @mgonto (https://twitter.com/mgonto)
Linkedin: http://www.linkedin.com/in/mgonto
Github: https://github.com/mgonto
On Monday, 6 de October de 2014 at 11:49, Germán Lena wrote:
In WP_Auth0.php:
@@ -345,6 +428,14 @@ private static function login_user( $userinfo, $data ){ > > public static function wp_init(){ > self::setup_rewrites(); > + > + $cdn_url = WP_Auth0_Options::get('cdn_url'); > + if (strpos($cdn_url, 'auth0-widget-5') !== false)
this is to upgrade from auth0-widget-5 to lock. Right now, it is tied to lock-6.min.js and will be updated until the next major release.
If we want to force the update, I added an internal version counter (other than the AUTH0_DB_VERSION) to manage the settings updates.—
Reply to this email directly or view it on GitHub (https://github.com/auth0/wp-auth0/pull/16/files#r18460630).
The rest looks good :). |
Let me try this out before merging though |
A few more changes:
Thanks! |
fix grafico
fix grafico
Added the Auth0 login plugin.
There were already a shortcode to show the auth0 login form.
Here is a screenshot of both (the new widget and the shortcode) https://cloudup.com/c9Ze-siQEBg
Is there any way that two login form can be shown?
If I add the widget and the shortcode only shows one of them