Automatic select the authentication method.