小编Msr*_*iga的帖子

响应类型无效

我正在使用 openidict 和 oidc-client 身份验证,

services.AddAuthentication(CookieAuthenticationDefaults.AuthenticationScheme)
    .AddCookie(CookieAuthenticationDefaults.AuthenticationScheme, options => 
    {
        options.LoginPath = "/Identity/Account/Login";
        options.LogoutPath = "/Identity/Account/Logout";
        
    })
    .AddOpenIdConnect(options =>
    {
        options.SignInScheme = CookieAuthenticationDefaults.AuthenticationScheme;
        options.ForwardSignIn = CookieAuthenticationDefaults.AuthenticationScheme;

        options.Authority = baseUrl;
        options.CallbackPath = new PathString("/authentication/login-callback");
        options.SignedOutRedirectUri = baseUrl;

        options.ClientId = AuthenticationClient.WebClientId;

        options.RequireHttpsMetadata = true;
        options.GetClaimsFromUserInfoEndpoint = true;
        options.SaveTokens = true;
        options.UsePkce = true;

        /// Use the authorization code flow.
        options.ResponseType = OpenIdConnectResponseType.CodeIdToken;
        options.AuthenticationMethod = OpenIdConnectRedirectBehavior.RedirectGet;

        options.Scope.Add(Scopes.OpenId);
        options.Scope.Add(Scopes.Profile);
        options.Scope.Add(AuthenticationClient.WebClientApiScope);
}
Run Code Online (Sandbox Code Playgroud)

此处,当响应类型设置为“代码 id/代码 id_token/代码令牌”时,我收到不支持 Open ID 连接混合流错误。

当它是“代码”时,我收到以下错误。

error:unauthorized_client
error_description:The specified 'response_type' is not …
Run Code Online (Sandbox Code Playgroud)

openiddict oidc-client

5
推荐指数
1
解决办法
2158
查看次数

标签 统计

oidc-client ×1

openiddict ×1