File tree Expand file tree Collapse file tree
src/NuGetGallery/Authentication/Providers/AzureActiveDirectoryV2 Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -47,6 +47,7 @@ public static class AuthenticationType
4747 private static string _callbackPath = "users/account/authenticate/return" ;
4848 private static HashSet < string > _errorMessageList = new HashSet < string > { "access_denied" , "consent_required" } ;
4949 private static HashSet < string > _alternateSiteRootList ;
50+ private const string SELECT_ACCOUNT = "select_account" ;
5051
5152 /// <summary>
5253 /// The possible values returned by <see cref="V2Claims.ACR"/> claim, and also the possible token values to be sent
@@ -214,7 +215,8 @@ private Task AuthenticationFailed(AuthenticationFailedNotification<OpenIdConnect
214215 }
215216
216217 /// <summary>
217- /// Before redirecting for authentication to the provider, append the properties for Multi-Factor Authentication.
218+ /// Before redirecting for authentication to the provider, append the properties for Multi-Factor Authentication
219+ /// and configuration settings.
218220 /// </summary>
219221 /// <param name="notification">The properties used for authentication</param>
220222 /// <returns>awaitable Task</returns>
@@ -242,6 +244,9 @@ private Task RedirectToIdentityProvider(RedirectToIdentityProviderNotification<O
242244 notification . ProtocolMessage . RedirectUri = "https://" + notification . Request . Uri . Host + "/" + _callbackPath ;
243245 }
244246
247+ // We always want to show the options to select account when signing in and while changing account.
248+ notification . ProtocolMessage . Prompt = SELECT_ACCOUNT ;
249+
245250 return Task . FromResult ( 0 ) ;
246251 }
247252
You can’t perform that action at this time.
0 commit comments