diff --git a/src/Lithnet.CredentialProvider/CredentialTile.ICredentialProviderCredential.cs b/src/Lithnet.CredentialProvider/CredentialTile.ICredentialProviderCredential.cs
index 81b0362..7b858aa 100644
--- a/src/Lithnet.CredentialProvider/CredentialTile.ICredentialProviderCredential.cs
+++ b/src/Lithnet.CredentialProvider/CredentialTile.ICredentialProviderCredential.cs
@@ -66,8 +66,8 @@ namespace Lithnet.CredentialProvider
{
this.logger.LogTrace("SetSelected");
this.IsSelected = true;
- pbAutoLogon = this.IsAutoLogon ? 1 : 0;
- this.OnSelected();
+ this.OnSelected(out bool autoLogon);
+ pbAutoLogon = autoLogon ? 1 : 0;
return HRESULT.S_OK;
}
catch (Exception ex)
diff --git a/src/Lithnet.CredentialProvider/CredentialTile.cs b/src/Lithnet.CredentialProvider/CredentialTile.cs
index f756f59..9290143 100644
--- a/src/Lithnet.CredentialProvider/CredentialTile.cs
+++ b/src/Lithnet.CredentialProvider/CredentialTile.cs
@@ -164,7 +164,14 @@ namespace Lithnet.CredentialProvider
///
/// Called when the user selects this tile
///
- protected virtual void OnSelected() { }
+ /// A value that indicates if logon should be performed immediately, without waiting for further user input
+ ///
+ /// In Windows 10, if a credential provider wants to automatically log the user on in a situation Windows does not think is appropriate, the system will display a sign in button as a speed bump. One example of this is when a user with an empty password locks the computer or signs out. In that scenario, Windows does not directly log the user back in.
+ ///
+ protected virtual void OnSelected(out bool autoLogon)
+ {
+ autoLogon = false;
+ }
///
/// Called when a user deselects this tile