Hi,
Sorry, we are late,
I think it's possible,but I don't know much about DUO Universal Prompt, It looks like a 3rd party 2FA verification server.
You can customise the login model of the account pro module, and redirect to DUO Universal Prompt if the user needed.
For example:
public class MoLoginModel : LoginModel
{
public MoLoginModel(IAuthenticationSchemeProvider schemeProvider, IOptions<AbpAccountOptions> accountOptions, IAbpRecaptchaValidatorFactory recaptchaValidatorFactory, IAccountExternalProviderAppService accountExternalProviderAppService, ICurrentPrincipalAccessor currentPrincipalAccessor, IOptions<IdentityOptions> identityOptions, IOptionsSnapshot<reCAPTCHAOptions> reCaptchaOptions) : base(schemeProvider, accountOptions, recaptchaValidatorFactory, accountExternalProviderAppService, currentPrincipalAccessor, identityOptions, reCaptchaOptions)
{
}
protected override async Task<IActionResult> CheckLocalLoginAsync()
{
var result = await base.CheckLocalLoginAsync();
if (result != null)
{
return result;
}
//get the user to check if need to redirect
var user = await UserManager.FindByNameAsync(LoginInput.UserNameOrEmailAddress);
return await RedirectToDuoUniversal();
}
protected async Task<IActionResult> RedirectToDuoUniversal()
{
.....
}
}
Anyway, your ticket refunded.
Hi,
See:https://github.com/abpframework/abp/blob/95f9ff405796fe898c9f6c8295e2e4bb0d6963c5/framework/src/Volo.Abp.EntityFrameworkCore/Volo/Abp/EntityFrameworkCore/AbpDbContext.cs#L184
catch (DbUpdateConcurrencyException ex)
{
throw new AbpDbConcurrencyException(ex.Message, ex);
}
I think you can get the DbUpdateConcurrencyException
from AbpDbConcurrencyException.InnerException
Hi,
Could you provide the steps to reproduce? thanks.
BTW, when you logged into the Blazor application, are other pages work? like users, roles..
Hi,
Sorry, try this:
eventBus.on('http-client-created', e => {
// Register Axios middleware.
e.service.register({
onRequest(request) {
request.headers["Authorization"] = "Bearer @Model.Token";
return request;
}
});
});
I was follow the document: https://elsa-workflows.github.io/elsa-core/docs/next/extensibility/extensibility-designer-plugins#intercept-outgoing-http-requests
But it's not correct, because It replaces the entire request header
OpenIddict could be configured to create an account for new users.
I think this is already done, ABP will handle it for you, could you give it a try?
Hi,
You can try this:
public class ElsaModel : PageModel
{
public string Token { get; set; }
public async Task OnGetAsync()
{
Token = await HttpContext.GetTokenAsync("access_token");
}
}
....
<body class="h-screen" style="background-size: 30px 30px; background-image: url(/_content/Elsa.Designer.Components.Web/elsa-workflows-studio/assets/images/tile.png); background-color: #FBFBFB;">
<elsa-studio-root server-url="@serverUrl" monaco-lib-path="_content/Elsa.Designer.Components.Web/monaco-editor/min"><elsa-studio-dashboard></elsa-studio-dashboard></elsa-studio-root>
<script>
function AuthorizationMiddlewarePlugin(elsaStudio) {
const eventBus = elsaStudio.eventBus;
eventBus.on('http-client-created', e => {
// Register Axios middleware.
e.service.register({
onRequest(request) {
request.headers = { 'Authorization': 'Bearer @Model.Token' }
return request;
}
});
});
}
const elsaStudioRoot = document.querySelector('elsa-studio-root');
elsaStudioRoot.addEventListener('initializing', e => {
const elsaStudio = e.detail;
elsaStudio.pluginManager.registerPlugin(AuthorizationMiddlewarePlugin);
});
</script>
</body>
....
Hi,
What's the error log?
BTW, I see you are using bookstore.com
, do you have local host DNS?
Hi.
Could you share a project with me that can reproduce the problem? thanks. shiwei.liang@volosoft.com