Authy in Custom Login Page
-
I guess this question has been asked before but I couldn’t find any answer to it.
I have created a custom login form and I am using the following code to check the credentials of the user:
` $creds = array();
$creds[‘user_login’] = $_POST[‘username’];
$creds[‘user_password’] = $_POST[‘login_password’];
$creds[‘remember’] = true;
$user_validate = wp_signon( $creds, false );
if ( is_wp_error($user_validate) ){
header(‘Location: ‘.home_url().’/login?error_msg=Invalid Username or Password’);
exit;
}
header(‘Location: ‘.home_url());
exit();`For non Authy enabled user everything is okay, the credentials gets verified and the user gets redirected to the home page (logged in) but when I enable Authy for my account and then try to login, I am redirected the the page where it asks for authy key, after entering the key instead of getting logged in, I am redirected to the homepage without being logged in.
What am I doing wrong, can you guys please help.
- The topic ‘Authy in Custom Login Page’ is closed to new replies.