Hello,
I was having the same issue so I dig into the plugin code ; there’s a missing filter, or a problem with the code line 205 :
function Login ( $user ){
/*
Check to see if the user already exists
*/
if ( false === ( $user_id = username_exists( $user->preferred_username ) ) ){
/*
Create the user
*/
$username = $user->preferred_username;
//$username = apply_filters( 'okta_username', $user );
$user_id = wp_insert_user ( array(
'user_login' => $username,
'password' => wp_generate_password()
) );
if ( is_wp_error ( $user_id ) ) {
die( $user_id->get_error_message() );
}
}
I commented the filter okta_username : this filter is never called in the plugin, so the $username variable stay empty, and is used just after to create an user with this login. As WP doesn’t allow creating user with empty user_login, it throws an error.
I added instead $username = $user->preferred_username which is the email address of the okta account.
(the filter could be reactivated if we need to rewrite the username based on the user object returned by okta).
@zillowgroup : can you check on your side and maybe update your plugin ?