Skip to content

Doc for Studio WASM OpenId Connect config is not working #132

@LinQiaoPorco

Description

@LinQiaoPorco

Documentation Improvement Request

Documentation Issue Overview

Is your documentation issue related to a specific problem? Please describe.
Step 7: Configure Studio for Azure AD
It shown a config method for Elsa Studio as

builder.Services.AddElsaStudio(studio =>
{
    studio.ConfigureBackend(backend =>
    {
        backend.Url = new Uri("https://your-elsa-server.com");
        backend.UseAuthentication(() => new OpenIdConnectAuthenticationOptions
        {
            Authority = "https://login.microsoftonline.com/your-tenant-id",
            ClientId = "your-studio-client-id",
            RedirectUri = "https://your-studio.com/authentication/login-callback",
            PostLogoutRedirectUri = "https://your-studio.com/",
            ResponseType = "code",
            Scope = ["openid", "profile", "email"]
        });
    });
});

But when I am using Elsa 3.5.2, there is no extension method as AddElsaStudio(), so I tried to use

builder.Services
    .AddLoginModule()
    .UseOpenIdConnect(options =>
    {
        options.ClientId = "aaaa-aaaa-aaaa-aaaaaaa";
        options.Scopes = ["openid", "profile", "email", "offline_access"];
        options.AuthEndpoint = "https://login.microsoftonline.com/bbbbbb-bbbb-bbbb-bbbbbb/oauth2/v2.0/authorize";
        options.TokenEndpoint = $"https://login.microsoftonline.com/bbbbbb-bbbb-bbbb-bbbbbb/oauth2/v2.0/token";
        options.EndSessionEndpoint = $"https://login.microsoftonline.com/bbbbbb-bbbb-bbbb-bbbbbb/oauth2/v2.0/logout";
        options.UsePkce = true;
    });

But it is still not working. error be like:

Image

Proposed Documentation Changes

Describe the changes or additions you'd like
Please update the doc to latest version of Elsa Studio for using OIDC.

Affected Sections

Identify which sections of the documentation are affected
Integrate Elsa Server + Studio WASM to existing framework.

Impact of Changes

Explain the potential impact
Can not integrate Elsa Server + Studio WASM to existing framework.

Additional Context

Add any other context or visuals
N/A

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions