3

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?

Rafaqat Ali
  • 676
  • 7
  • 26

1 Answers1

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();
    });
  • 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