Plugin Directory

Changeset 2230431


Ignore:
Timestamp:
01/20/2020 04:02:46 PM (6 years ago)
Author:
superauth
Message:

Version 1.1.3

Location:
superauth
Files:
7 added
3 edited

Legend:

Unmodified
Added
Removed
  • superauth/trunk/readme.txt

    r2193729 r2230431  
    44Tags: username, password, passwords, no, fingerprint, superauth, auth, web, app, login, push, notification, android, iOS, windows, iPhone, iPad, phone, mobile, smartphone, computer, oauth, sso, authentication, encryption, ssl, secure, security, strong, harden, single sign-on, signon, signup, signin, login, log in, wp-login, 2 step authentication, two-factor authentication, two step, two factor, 2-Factor, 2fa, two, tfa, mfa, qr, multi-factor, multifactor
    55Requires at least: 4.7.0
    6 Tested up to: 5.3
    7 Stable tag: 1.1.2
     6Tested up to: 5.3.2
     7Stable tag: 1.1.3
    88License: GPLv2 or later
    99License URI: https://www.gnu.org/licenses/gpl-2.0.html
     
    118118== Upgrade Notice ==
    119119
     120= 1.1.3 =
     121* Improved performance.
     122
    120123= 1.1.2 =
    121124* Improved performance.
  • superauth/trunk/superauth-login-template.php

    r1909201 r2230431  
    66$redirect_to = home_url();
    77
     8/**logout test***/
     9/*if(isset($_GET['logoutemail'])){
     10  $logoutemail = $_GET['logoutemail'];
     11  $user = get_user_by('email', $logoutemail );
     12  if ( !is_wp_error( $user ) ) {
     13    // get all sessions for user with ID $user_id
     14    $sessions = WP_Session_Tokens::get_instance($user->ID);
     15    // we have got the sessions, destroy them all!
     16    $sessions->destroy_all();
     17   }     
     18}*/
     19
    820/*check state id matches */
    921if(session_id()) {
    1022    if(isset($_SESSION['superauthloginstate'])){ //session has state value
    11         $superauthloginstate = str_replace("-","",wp_generate_uuid4()) ;
     23        //$superauthloginstate = str_replace("-","",wp_generate_uuid4()) ;
     24        $superauthloginstate = $_SESSION['superauthloginstate'];
    1225        if(isset($_GET['state'])){ //get from query
    1326            if (strcmp($superauthloginstate, $_GET['state']) != 0) {
     
    6275    $user_name = superauth_create_username(compact('first_name', 'last_name'));
    6376   
    64     if ( email_exists($user_email) == false ) {
    65       //register user
    66       $user_pass = wp_generate_password( $length=12, $include_standard_special_chars=false );
    67       //$user_id = wp_create_user( $user_name, $user_pass, $user_email );
     77    if ( email_exists($user_email) == false) {
     78        if (get_option( 'users_can_register' ) ) {
     79            //register user
     80            $user_pass = wp_generate_password( $length=12, $include_standard_special_chars=false );
     81            //$user_id = wp_create_user( $user_name, $user_pass, $user_email );
    6882     
    69       $user_login = $user_name;
    70       $userdata = compact('user_login', 'user_email', 'user_pass', 'first_name', 'last_name');
     83            $user_login = $user_name;
     84            $userdata = compact('user_login', 'user_email', 'user_pass', 'first_name', 'last_name');
    7185            $user_id = wp_insert_user($userdata);
    72       if($user_id) {
    73         superauth_authenticate_user_by_id($user_id);
    74       }
     86            if($user_id) {
     87                superauth_authenticate_user_by_id($user_id);
     88            }
     89        }
    7590    } else {
    7691      //for login
     
    93108        wp_set_current_user( $userId, $user->user_login );
    94109        wp_set_auth_cookie( $userId );
    95         do_action( 'wp_login', $user->user_login );
     110        do_action( 'wp_login', $user->user_login, $user );
    96111    }
    97112  wp_safe_redirect(home_url());
     
    111126        $username .= '_' . $lname;
    112127       
    113     //echo '<div>FIRST: '.$username.'</div>';
     128    //echo '<div>FIRST: '.$username.'</div>'1;
    114129   
    115130    $username_to_check = $username;   
  • superauth/trunk/superauth.php

    r1909201 r2230431  
    33* Plugin Name: SuperAuth
    44* Description: SuperAuth is a revolutionary application that enables your users to safely log in to your websites or apps without typing a username or password. You can easily add or remove SuperAuth function without disturbing your user management. SuperAuth also ensures that your site is secure and protected from phishing.
    5 * Version: 1.1.2
     5* Version: 1.1.3
    66* Author: SuperAuth
    77*/
    8 
     8session_start();
    99if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
    1010
     
    241241    $display = '';
    242242    /*create state value */
    243     if(!session_id()) {
     243    /*if(!session_id()) {
    244244        session_start();
    245     }
     245    }*/
    246246    if(session_id()) {
    247247        $superauthloginstate = wp_generate_uuid4();
     
    267267function superauth_login_form_override() {
    268268    /*create state value */
    269     if(!session_id()) {
     269    //if(!session_id()) {
     270    /*if ( PHP_SESSION_NONE === session_status() ) {
    270271        session_start();
    271     }
     272    }*/
    272273    if(session_id()) {
    273274        $superauthloginstate = wp_generate_uuid4();
Note: See TracChangeset for help on using the changeset viewer.