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)
-
1
but in use https://localhost/connect/logout
This endpoint is designed use by MVC page. not vue or angular.
-
0
What should I call to log off?
I saw the logout in "angular", which is also the address called.
-
0
You can run an angular app and check how to logout.
-
0
Angular is called https://localhost/connect/logout.
-
0
Hello,
Can you send your environment file?
Can you send
.well-known/openid-configuration
endpoint's response? -
0
And what's your
authentication
configuration?eg
services.AddAuthentication()...
-
0
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: '', }, -
0
.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'}
-
0
hi
What are the full steps to reproduce with a new template project?
-
0
Yes。 abp Version 6.0.1 (Stable) Abp Suite v6.0.1 front end:Angular Database:MSSQL
-
0
https://support.abp.io/QA/Questions/3970#answer-328b1aa4-f776-6952-b80d-3a07446a2e05