Ends in:
4 DAYS
10 HRS
5 MIN
1 SEC
Ends in:
4 D
10 H
5 M
1 S
Open Closed

The authentication handler registered for scheme 'OpenIddict.Validation.AspNetCore' is 'OpenIddictValidationAspNetCoreHandler' which cannot be used for SignOutAsync #3970


User avatar
0
15937823 created
  • ABP Framework version: v6.0.1

  • UI type: Angular / VUE

  • DB provider: EF Core

  • Tiered (MVC) or Identity Server Separated (Angular): no

  • Exception message and stack trace:

  • Steps to reproduce the issue:"

  • When I use the VUE front-end UI, I use the https://localhost/connect/token Can or to the token, but in use https://localhost/connect/logout However, the following error occurs:

2022-11-01 10:12:25.672 +08:00 [ERR] The authentication handler registered for scheme 'OpenIddict.Validation.AspNetCore' is 'OpenIddictValidationAspNetCoreHandler' which cannot be used for SignOutAsync. The registered sign-out schemes are: Identity.Application, Identity.External, Identity.TwoFactorRememberMe, Identity.TwoFactorUserId, Abp.ConfirmUser, OpenIddict.Server.AspNetCore. System.InvalidOperationException: The authentication handler registered for scheme 'OpenIddict.Validation.AspNetCore' is 'OpenIddictValidationAspNetCoreHandler' which cannot be used for SignOutAsync. The registered sign-out schemes are: Identity.Application, Identity.External, Identity.TwoFactorRememberMe, Identity.TwoFactorUserId, Abp.ConfirmUser, OpenIddict.Server.AspNetCore. at Microsoft.AspNetCore.Authentication.AuthenticationService.SignOutAsync(HttpContext context, String scheme, AuthenticationProperties properties) at Microsoft.AspNetCore.Authentication.AuthenticationService.SignOutAsync(HttpContext context, String scheme, AuthenticationProperties properties) at Microsoft.AspNetCore.Identity.SignInManager`1.SignOutAsync() at Volo.Abp.OpenIddict.Controllers.LogoutController.GetAsync() at Microsoft.AspNetCore.Mvc.Infrastructure.ActionMethodExecutor.TaskOfIActionResultExecutor.Execute(IActionResultTypeMapper mapper, ObjectMethodExecutor executor, Object controller, Object[] arguments) at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.


11 Answer(s)
  • User Avatar
    1
    maliming created
    Support Team Fullstack Developer

    but in use https://localhost/connect/logout

    This endpoint is designed use by MVC page. not vue or angular.

  • User Avatar
    0
    15937823 created

    What should I call to log off?

    I saw the logout in "angular", which is also the address called.

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    You can run an angular app and check how to logout.

  • User Avatar
    0
    15937823 created

    Angular is called https://localhost/connect/logout.

  • User Avatar
    0
    muhammedaltug created

    Hello,

    Can you send your environment file?

    Can you send .well-known/openid-configuration endpoint's response?

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    And what's your authentication configuration?

    eg

    services.AddAuthentication()...
    
  • User Avatar
    0
    15937823 created

    I used the code generated by abp suite. The front end selects the angular, and other codes have not been moved.

    ** oidc.config.js**

    openIdConnectSettings: { authority: ${process.env.VUE_APP_BASE_URL}, client_id: *****_Vue_App, redirect_uri: ${process.env.VUE_APP_URL}, post_logout_redirect_uri: ${process.env.VUE_APP_URL}, silent_redirect_uri: ${process.env.VUE_APP_URL}, scope: openid offline_access ****, response_type: id_token token, automaticSilentRenew: true, grant_type: 'password', client_secret: *****, username: '', password: '', },

  • User Avatar
    0
    15937823 created

    .well-known/openid-configuration

    https://localhost/connect/token can get the token****

    {access_token: 'eyJhbGciOiJSUzI1NiIsImtpZCI6IjExMjVDMTk5OTM1M0U3Rj…FXsGOqdETP3Pszz06wFB0RnZoSn-nXRXX3R7dVjZguFHzEfZw', token_type: 'Bearer', expires_in: 3600, id_token: 'eyJhbGciOiJSUzI1NiIsImtpZCI6IjExMjVDMTk5OTM1M0U3Rj…sFaB9DIf51q-9eRb1dPHhDkqFTIWycGPdnJ3x7GGVT3TvTuag', refresh_token: 'eyJhbGciOiJSU0EtT0FFUCIsImVuYyI6IkEyNTZDQkMtSFM1MT…kTuKv.DJKCA1X8U_tk8zsP116obd6cAkKpjLoMepvYKm5pEus'}

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    What are the full steps to reproduce with a new template project?

  • User Avatar
    0
    15937823 created

    Yes。 abp Version 6.0.1 (Stable) Abp Suite v6.0.1 front end:Angular Database:MSSQL

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    https://support.abp.io/QA/Questions/3970#answer-328b1aa4-f776-6952-b80d-3a07446a2e05

Made with ❤️ on ABP v9.1.0-preview. Updated on December 02, 2024, 12:35