add action which returns modified value

The things you can change in there are:

  • $secure_cookie = apply_filters('secure_signon_cookie', $secure_cookie, $credentials); Cookie
  • The $credentials for the user_login and user_password1)

Example

add_action( 'wp_authenticate', 'wpse119273UserCredentials' );
function wpse119273UserCredentials( $credentials )
{
    // Make sure to secure that value
    $credentials['user_password'] = 'foo';
}

To generate a secure password, take a look at the function wp_generate_password() and its internals. Or better: Make it even more secure.

1) As @brasofilo noted in the comment (I’ve overseen that). @brasofilo – Copy/Paste my answer to take it, it’s your credits.

Leave a Comment