Making WordPress.org


Ignore:
Timestamp:
02/26/2018 07:06:12 AM (9 years ago)
Author:
dd32
Message:

2FA: Enable Email, Slack, and Backup Codes as the backup 2FA method.

See #77.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-two-factor/providers/class-wporg-two-factor-primary.php

    r6753 r6759  
    2424                return _x( 'Time Based One-Time Password (Google Authenticator, Authy, etc)', 'Provider Label', 'wporg' );
    2525        }
     26
     27        public function validate_authentication( $user, $code = '' ) {
     28                $key = get_user_meta( $user->ID, self::SECRET_META_KEY, true );
     29
     30                if ( ! $code ) {
     31                        $code = $_REQUEST['authcode'];
     32                }
     33
     34                return $this->is_valid_authcode( $key, $code );
     35        }
    2636}
Note: See TracChangeset for help on using the changeset viewer.