Skip to content

Commit

Permalink
Merge pull request #198 from auth0/dev
Browse files Browse the repository at this point in the history
v2.1.11
  • Loading branch information
glena committed Apr 27, 2016
2 parents 73225be + 554a8bf commit c60d7aa
Show file tree
Hide file tree
Showing 8 changed files with 13 additions and 42 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ For both scenarios you may configure in the WP admin whether is mandatory that t

### Accesing Profile Information

You can access the rich user profile information coming from the Identity Providers. **WordPress** defines a function called `get_currentuserinfo` to populate the global variable `current_user` with the logged in `WP_User`. Similary we define `get_currentauth0userinfo` that populates `current_user` and `currentauth0_user` with the information of the Normalized profile.
You can access the rich user profile information coming from the Identity Providers. **WordPress** defines a function called `wp_get_current_user` to populate the global variable `current_user` with the logged in `WP_User`. Similary we define `get_currentauth0userinfo` that populates `current_user` and `currentauth0_user` with the information of the Normalized profile.

### Enabling dual (Auth0 and Wordpress) login

Expand Down
6 changes: 3 additions & 3 deletions WP_Auth0.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/**
* Plugin Name: PLUGIN_NAME
* Description: PLUGIN_DESCRIPTION
* Version: 2.1.10
* Version: 2.1.11
* Author: Auth0
* Author URI: https://auth0.com
*/
Expand All @@ -12,7 +12,7 @@
define( 'WPA0_PLUGIN_URL', trailingslashit( plugin_dir_url( __FILE__ ) ) );
define( 'WPA0_LANG', 'wp-auth0' );
define( 'AUTH0_DB_VERSION', 4 );
define( 'WPA0_VERSION', '2.1.10' );
define( 'WPA0_VERSION', '2.1.11' );

/**
* Main plugin class
Expand Down Expand Up @@ -361,7 +361,7 @@ function get_currentauth0user() {
global $current_user;
global $wpdb;

get_currentuserinfo();
wp_get_current_user();

if ( $current_user instanceof WP_User && $current_user->ID > 0 ) {
$sql = 'SELECT * FROM ' . $wpdb->auth0_user .' WHERE wp_id = %d order by last_update desc limit 1';
Expand Down
4 changes: 2 additions & 2 deletions lib/WP_Auth0_DBManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ function get_currentauth0user() {
global $current_user;
global $wpdb;

get_currentuserinfo();
wp_get_current_user();

if ( $current_user instanceof WP_User && $current_user->ID > 0 ) {
$sql = 'SELECT * FROM ' . $wpdb->auth0_user .' WHERE wp_id = %d order by last_update desc limit 1';
Expand All @@ -147,7 +147,7 @@ public function get_current_user_profiles() {
global $current_user;
global $wpdb;

get_currentuserinfo();
wp_get_current_user();
$userData = array();

if ($current_user instanceof WP_User && $current_user->ID > 0 ) {
Expand Down
3 changes: 2 additions & 1 deletion lib/WP_Auth0_LoginManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ public function logout() {

$sso = $this->a0_options->get( 'sso' );
$slo = $this->a0_options->get( 'singlelogout' );
$client_id = $this->a0_options->get( 'client_id' );
$auto_login = absint( $this->a0_options->get( 'auto_login' ) );

if ($slo && isset($_REQUEST['SLO'])) {
Expand All @@ -102,7 +103,7 @@ public function logout() {

if ( $sso ) {
$redirect_to = home_url();
wp_redirect( 'https://' . $this->a0_options->get( 'domain' ) . '/v2/logout?returnTo=' . urlencode( $redirect_to ) . '&auth0Client=' . WP_Auth0_Api_Client::get_info_headers() );
wp_redirect( 'https://' . $this->a0_options->get( 'domain' ) . '/v2/logout?returnTo=' . urlencode( $redirect_to ) . '&client_id='.$client_id.'&auth0Client=' . base64_encode(json_encode(WP_Auth0_Api_Client::get_info_headers())) );
die();
}

Expand Down
2 changes: 1 addition & 1 deletion lib/admin/WP_Auth0_Admin_Features.php
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ public function sso_validation( $old_options, $input ) {
if ($old_options['sso'] != $input['sso'] && 1 == $input['sso']) {
if ( false === WP_Auth0_Api_Client::update_client($input['domain'], $input['auth0_app_token'], $input['client_id'],$input['sso'] == 1) ) {

$error = __( 'There was an error updating your Auth0 App to enable SSO. To do it manually, turn it on ', WPA0_LANG );
$error = __( 'There was an error updating your Auth0 App to enable SSO. To do it manually, turn it ', WPA0_LANG );
$error .= '<a href="https://auth0.com/docs/sso/single-sign-on#1">HERE</a>.';
$this->add_validation_error( $error );

Expand Down
30 changes: 0 additions & 30 deletions plugins_info.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,35 +10,5 @@
"description":"Login with any social provider you can think of with this plugin and the Auth0 dashboard.",
"repository":"http://plugins.svn.wordpress.org/social-login-with-auth0/",
"tags":"login, oauth, authentication, social login, social, facebook, google, twitter, baidu, renren, linkedin, github, paypal, yahoo, amazon, vkontakte, salesforce, box, dwolla, yammer"
},
{
"name":"Multi-factor Authentication with Auth0",
"description":"MFA is easy with Auth0. Connect WP to social and enterprise login and add MFA free with our dashboard.",
"repository":"http://plugins.svn.wordpress.org/multi-factor-authentication-with-auth0/",
"tags":"login, authentication, mfa, multifactor, multi factor, multi-factor, two factor, two-factor, 2FA"
},
{
"name":"SSO with Auth0",
"description":"SSO is easy with Auth0. Connect WP to any SSO solution you can think of with our dashboard.",
"repository":"http://plugins.svn.wordpress.org/sso-with-auth0/",
"tags":"login, oauth, authentication, single sign on, sso"
},
{
"name":"Single Sign On with Auth0",
"description":"Connect WP to any Single Sign On provider you can think of in 5 minutes with the Auth0 dashboard.",
"repository":"http://plugins.svn.wordpress.org/single-sign-on-with-auth0/",
"tags":"login, oauth, authentication, single sign on, sso"
},
{
"name":"SMS Login with Auth0",
"description":"Allow your users to login with SMS codes with Auth0's dashboard. It's easy!",
"repository":"http://plugins.svn.wordpress.org/sms-login-with-auth0/",
"tags":"login, oauth, authentication, passwordless, sms, magiclink, totp, social"
},
{
"name":"Two Factor Authentication with Auth0",
"description":"Two Factor Auth for WP in two minutes with the Auth0 dashboard.",
"repository":"http://plugins.svn.wordpress.org/two-factor-authentication-with-auth0/",
"tags":"login, authentication, mfa, multifactor, multi factor, multi-factor, two factor, two-factor, 2FA"
}
]
2 changes: 1 addition & 1 deletion plugins_info_original.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
{
"name":"Two Factor Authentication with Auth0",
"description":"Two Factor Auth for WP in two minutes with the Auth0 dashboard.",
"repository":"two-factor-authentication-with-auth0",
"repository":"http://plugins.svn.wordpress.org/two-factor-authentication-with-auth0",
"tags":"login, authentication, mfa, multifactor, multi factor, multi-factor, two factor, two-factor, 2FA"
},
{
Expand Down
6 changes: 3 additions & 3 deletions readme.txt
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
=== PLUGIN_NAME ===
Tags: PLUGIN_TAGS
Tested up to: 4.4
Tested up to: 4.5
Requires at least: 3.8
License: MIT
License URI: https://github.com/auth0/wp-auth0/blob/master/LICENSE.md
Stable tag: trunk
Contributors: glena, rrauch
Contributors: auth0, glena, rrauch

PLUGIN_DESCRIPTION

Expand Down Expand Up @@ -67,7 +67,7 @@ For both scenarios you may configure in the WP admin whether is mandatory that t

= Accesing Profile Information =

Wordpress defines a function called `get_currentuserinfo` to populate the global variable `current_user` with the logged in WP_User. Similary we define `get_currentauth0userinfo` that populates `current_user` and `currentauth0_user` with the information of the [Normalized profile](https://docs.auth0.com/user-profile)
Wordpress defines a function called `wp_get_current_user` to populate the global variable `current_user` with the logged in WP_User. Similary we define `get_currentauth0userinfo` that populates `current_user` and `currentauth0_user` with the information of the [Normalized profile](https://docs.auth0.com/user-profile)

= Enabling dual (Auth0 and Wordpress) login =

Expand Down

0 comments on commit c60d7aa

Please sign in to comment.