Can anyone guide me on how can we add authentication to Elsa's dashboard? Right now, anonymous users can see the workflows and create. I want to restrict this behavior to specific users?
Asked
Active
Viewed 1,273 times
1 Answers
1
The specifics probably depend on your .net version, but I believe what you want to do is set a fallback policy so that pages/controllers without [Authorize] attribute still require authentication.
Grabbed from https://learn.microsoft.com/en-us/aspnet/core/security/authorization/secure-data?view=aspnetcore-5.0
services.AddAuthorization(options =>
{
options.FallbackPolicy = new AuthorizationPolicyBuilder()
.RequireAuthenticatedUser()
.Build();
});

Zoltan Grose
- 51
- 6
-
thanks for the help. But in the case of Elsa, I don't have any code/controllers at my side, I'm just using the NuGet package. I don't want to go this route. – Rafaqat Ali Mar 15 '21 at 10:30
-
I don’t believe Elsa has any authentication framework of its own, it just plugs into the host’s authentication. – Zoltan Grose Mar 16 '21 at 16:42