Ok, no problem. Glad to hear it isn't a permanent plan!
It looks like something very important was recently removed from ABP! The ability to scaffold out a new site with a specific version!!! I highly depend on this capability. Having to upgrade my entire site just to integrate some new code from a scaffolded project is not acceptable. The old CLI has --version. Where is the ability to select which version is used for building code in the new ABP cli/studio?
It looks like it was a bug with an older version of ABP Studio 6.6 or something. Uninstalling and reinstalling ABP Studio entirely fixed the problem (WITHOUT having to add that VoloAbpCommercialSuiteTemplatesModule module to by sub project. Perhaps this could be refunded...
ABP studio 6.6 wasn't updating correctly even though it would repeatedly install the latest update the old version was still there hidden. Confusing.
Sorry which module are you talking about? This is a custom sub module I am trying to edit. I have tried building first. Modular monolith design. This seems like a bug.
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.