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
do I need to configure the the same DbSets in both contexts if I want the tenant tables also to be in the host database?
Hi, yes you need it, otherwise it won't create the table
Hi,
Azure AD and openiddict are two things. azure ad does not depend on openiddict.
we have document you can check it: https://docs.abp.io/en/abp/2.8/How-To/Azure-Active-Directory-Authentication-MVC