Skip to content
Merged
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
12 changes: 6 additions & 6 deletions WP_Auth0.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/**
* Plugin Name: Wordpress Auth0 Integration
* Description: Implements the Auth0 Single Sign On solution into Wordpress
* Version: 1.2.3
* Version: 1.2.4
* 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', 2);
define('WPA0_VERSION', '1.2.3');
define('WPA0_VERSION', '1.2.4');

class WP_Auth0 {
public static function init(){
Expand Down Expand Up @@ -388,13 +388,13 @@ public static function init_auth0(){

$userinfo = json_decode( $response['body'] );
if (self::login_user($userinfo, $data)) {
if ($stateFromGet->interim) {
if ($stateFromGet !== null && isset($stateFromGet->interim) && $stateFromGet->interim) {
include WPA0_PLUGIN_DIR . 'templates/login-interim.php';
exit();

} else {

if (isset($stateFromGet->redirect_to)) {
if ($stateFromGet !== null && isset($stateFromGet->redirect_to)) {
$redirectURL = $stateFromGet->redirect_to;
} else {
$redirectURL = WP_Auth0_Options::get( 'default_login_redirection' );
Expand Down Expand Up @@ -656,13 +656,13 @@ public static function implicitLogin() {
$decodedToken->user_id = $decodedToken->sub;

if (self::login_user($decodedToken, $token)) {
if ($stateFromGet->interim) {
if ($stateFromGet !== null && isset($stateFromGet->interim) && $stateFromGet->interim) {
include WPA0_PLUGIN_DIR . 'templates/login-interim.php';
exit();

} else {

if (isset($stateFromGet->redirect_to)) {
if ($stateFromGet !== null && isset($stateFromGet->redirect_to)) {
$redirectURL = $stateFromGet->redirect_to;
} else {
$redirectURL = WP_Auth0_Options::get( 'default_login_redirection' );
Expand Down