I'm trying to use ABP Suite to Generate a previously generated entity in a sub module project but it is giving me the error
Cannot find "Volo.Abp.Commercial.SuiteTemplates.dll". ABP Suite cannot find it in any sub folders of C:\Users\UserName\Source\repos\Project\modules\Project.SubModule
I tried adding <PackageReference Include="Volo.Abp.Commercial.SuiteTemplates" Version="9.0.3" /> to the domain project but that didn't help!
I even added
[DependsOn(typeof(VoloAbpCommercialSuiteTemplatesModule))]
...
public class My*****DomainModule : AbpModule
using ABP Suite v9.0.3.
You're the best!!
I removed the CustomLogoutModel and instead added options.Prompt = "select_account"
to ConfigureAuthentication().
sAuth.AddOpenIdConnect("AzureAD", "Microsoft/365", options =>
{
options.Authority = "https://login.microsoftonline.com/" + configuration["auth:AzureAd:TenantId"] + "/v2.0/";
options.ClientId = configuration["auth:AzureAd:ClientId"];
options.ResponseType = OpenIdConnectResponseType.CodeIdToken;
options.CallbackPath = configuration["auth:AzureAd:CallbackPath"];
options.ClientSecret = configuration["auth:AzureAd:ClientSecret"];
options.RequireHttpsMetadata = false;
options.SaveTokens = true;
options.GetClaimsFromUserInfoEndpoint = true;
options.Scope.Add("email");
options.Prompt = "select_account";
options.ClaimActions.MapJsonKey(ClaimTypes.NameIdentifier, "sub");
}
And now it allows me to easily select a different account each time I "login" with AzureAD. Perfect! Thanks.
[14:13:53 DBG] Started background worker: Volo.Abp.BackgroundJobs.BackgroundJobWorker
[14:13:53 DBG] Started background worker: Volo.Abp.Identity.Session.IdentitySessionCleanupBackgroundWorker
[14:13:53 DBG] Started background worker: Volo.Abp.OpenIddict.Tokens.TokenCleanupBackgroundWorker
[14:13:54 DBG] Started background worker: Volo.Abp.AuditLogging.ExpiredAuditLogDeleterWorker
Restarting AGAIN (sometimes several times) can fix it.
Nor did this. I'm missing something
var callbackUrl = "https://login.microsoftonline.com/" + configuration["auth:AzureAd:TenantId"] + "oauth2/v2.0/logout?post_logout_redirect_uri="
+ UrlEncoder.Default.Encode(configuration["App:SelfUrl"] + "/Account/Logout");
I"m trying to add signout functionality to my ABP app which uses Azure AD/Entra to authenticate. My config looks like:
sAuth.AddOpenIdConnect("AzureAD", "Microsoft/365", options =>
{
options.Authority = "https://login.microsoftonline.com/" + configuration["auth:AzureAd:TenantId"] + "/v2.0/";
options.ClientId = configuration["auth:AzureAd:ClientId"];
options.ResponseType = OpenIdConnectResponseType.CodeIdToken;
options.CallbackPath = configuration["auth:AzureAd:CallbackPath"];
options.ClientSecret = configuration["auth:AzureAd:ClientSecret"];
options.RequireHttpsMetadata = false;
options.SaveTokens = true;
options.GetClaimsFromUserInfoEndpoint = true;
options.Scope.Add("email");
options.ClaimActions.MapJsonKey(ClaimTypes.NameIdentifier, "sub");
}
I added the following class and that successfully enabled users to "sign out" but what I actually want is for users to be able to switch users. I do NOT want to see the Microsoft "Pick and account" dialog asking "Which account do you want to sign out of?" I tried adding redirect as you see below but that didn't help.
[Dependency(ReplaceServices = true)]
[ExposeServices(typeof(LogoutModel))]
public class CustomLogoutModel : LogoutModel
{
public override async Task<IActionResult> OnGetAsync()
{
if (CurrentUser.IsAuthenticated)
{
await IdentitySecurityLogManager.SaveAsync(new IdentitySecurityLogContext
{
Identity = IdentitySecurityLogIdentityConsts.Identity,
Action = IdentitySecurityLogActionConsts.Logout
});
}
//
await SignInManager.SignOutAsync();
await HttpContext.SignOutAsync(ConfirmUserModel.ConfirmUserScheme);
await HttpContext.SignOutAsync(ChangePasswordModel.ChangePasswordScheme);
//return SignOut("AzureAD");
var callbackUrl = Url.Page("/Account/Logout", pageHandler: null, values: null, protocol: Request.Scheme);
var properties = new AuthenticationProperties
{
RedirectUri = callbackUrl
};
return SignOut(properties, "AzureAD");
}
}
I just want to let the users sign in again with another user.
I hope this gets resolved faster next time!!
24 hour issue support for ABP servers. :)
I'm afraid everyone is asleep who can fix things...