- ABP Framework version: 4.4.2
- UI type: MVC
- DB provider: EF Core
- Tiered (MVC) or Identity Server Separated (Angular): no
- Exception message and stack trace: https://localhost:44322/Account/LoggedOut?ClientName=Mbb_MicroService_Web&SignOutIframeUrl=https%3A%2F%2Flocalhost%3A44322%2Fconnect%2Fendsession%2Fcallback%3FendSessionId%3DCfDJ8Oes8R5tY-pEgD3odznXSRP_xtOvZiLeZHiUVYng0aWA1t8otE1beP5YbT_c9axxIXXUpQVrwg8MJ3IRfwAicWy9nnmv7kHuK0le7733cjFzsjUVbEbgFwGc29sMxWd0bn3cEbACa_4KU6XhO5LVUr1GGgG6E801pRB5gOXiGfqgBn_LqAjDa1nh_lBWv5ThHqmYTOA4iXwLo-Zzzv90b55wqnaaubmzIOSEtqqkQwoFoHutNIOdXosFXGgStA4RMn91SXLdBZJny4OSaOkIEIY5_WRYN0XPPpcmyWByjHBprDUb7sZhqX6Ec48-YyHRmPZKVy1IduNwGAYI5HrT318&PageContext=Microsoft.AspNetCore.Mvc.RazorPages.PageContext
- Steps to reproduce the issue: We have a microservice architecture based on abp commericla microservice template. When we click "LogOut" we are having a url like seen on exception message part. It is written as "Çıkış yaptınız ve birazdan yönlendirileceksiniz." "You are logged out and now redirecting" but no redirection working on.
- In IdentityServerClientPostLogoutRedirectUris table of Identity database is filled with clients ids and logout uris.
11 Answer(s)
-
0
hi
Please check the application's logs and the browser's console.
Can you reproduce the problem in the same version of the template project?
-
0
Actually problem case is all stable because when we click logout we have the same screen with same message. It is not redirecting us to main page with a long url written on browser and redirecting message on screen.
we have this error log on console: Volo.Abp.Account.Public.Web.Pages.Account.LoggedOutModel.EDDCA25265E1322DDB0FD797A7078293.js?_v=638089242017229999:1 Uncaught TypeError: Cannot read properties of null (reading 'getAttribute') at Volo.Abp.Account.Public.Web.Pages.Account.LoggedOutModel.EDDCA25265E1322DDB0FD797A7078293.js?_v=638089242017229999:1:138 (anonymous) @ Volo.Abp.Account.Public.Web.Pages.Account.LoggedOutModel.EDDCA25265E1322DDB0FD797A7078293.js?_v=638089242017229999:1 setTimeout (async) (anonymous) @ Volo.Abp.Account.Public.Web.Pages.Account.LoggedOutModel.EDDCA25265E1322DDB0FD797A7078293.js?_v=638089242017229999:1
-
0
and this logs in application side:
2023-01-09 14:07:56.977 +03:00 [INF] Request starting HTTP/2 GET https://localhost:44322/connect/endsession?post_logout_redirect_uri=https%3A%2F%2Flocalhost%3A44321%2Fsignout-callback.................................................... JqFNB68bvcgJFfBQWtMAM9Who9bz3K4rTLlEkLsApGll7oN0ONXjtD32iwT0kLu3GGGIKsItv-2uF73cEkrOi3DIDnytx9kRZagz_504ACITYmQn-Im9FC0&x-client-SKU=ID_NETSTANDARD2_0&x-client-ver=6.7.1.0 - - 2023-01-09 14:07:56.981 +03:00 [DBG] Request path /connect/endsession matched to endpoint type Endsession 2023-01-09 14:07:56.982 +03:00 [DBG] Endpoint enabled: Endsession, successfully created handler: IdentityServer4.Endpoints.EndSessionEndpoint 2023-01-09 14:07:56.983 +03:00 [INF] Invoking IdentityServer endpoint: IdentityServer4.Endpoints.EndSessionEndpoint for /connect/endsession 2023-01-09 14:07:56.984 +03:00 [DBG] Processing signout request for 733427a9-4bcb-4643-dd5d-3a0256522008 2023-01-09 14:07:56.985 +03:00 [DBG] Start end session request validation 2023-01-09 14:07:56.986 +03:00 [DBG] Start identity token validation 2023-01-09 14:07:56.995 +03:00 [DBG] client configuration validation for client Mbb_MicroService_Web succeeded. 2023-01-09 14:07:56.995 +03:00 [DBG] Client found: Mbb_MicroService_Web / Mbb_MicroService_Web 2023-01-09 14:07:56.996 +03:00 [DBG] Calling into custom token validator: IdentityServer4.Validation.DefaultCustomTokenValidator 2023-01-09 14:07:56.996 +03:00 [DBG] Token validation success {"ClientId":"Mbb_MicroService_Web","ClientName":"Mbb_MicroService_Web","ValidateLifetime":false,"AccessTokenType":null,"ExpectedScope":null,"TokenHandle":null,"JwtId":null,"Claims":{"nbf":1673262469,"exp":1673262769,"iss":"https://localhost:44322","aud":"Mbb_MicroService_Web","nonce":"638088592387614327.NjFjMjZiNWEtOTNmYS00YmVhLTg3MWUtZTdmYTZmM2VmMzM4M2JhNTY2ZmMtYWMyNS00ZjdiLTljYzgtMTRkNmE1NjM1MzI4","iat":1673262469,"at_hash":"c3dKtAtCs6DuoR9tFP5m7Q","s_hash":"pa4DiryekymcYPSrS0VCqA","sid":"904378A2F16B397919ED8A6CC3886B5A","sub":"733427a9-4bcb-4643-dd5d-3a0256522008","auth_time":1673262468,"idp":"local","http://schemas.xmlsoap.org/ws/2005/05/identity/claims/givenname":"admin","http://schemas.xmlsoap.org/ws/2005/05/identity/claims/surname":"admin","preferred_username":"admin","given_name":"admin","family_name":"admin","role":"admin","phone_number_verified":"False","email":"admin@mugla.bel.tr","email_verified":"False","name":"admin","amr":"pwd"},"$type":"TokenValidationLog"} 2023-01-09 14:07:56.997 +03:00 [WRN] Invalid PostLogoutRedirectUri: https://localhost:44321/signout-callback-oidc 2023-01-09 14:07:56.998 +03:00 [INF] End session request validation success {"ClientId":"Mbb_MicroService_Web","ClientName":"Mbb_MicroService_Web","SubjectId":"733427a9-4bcb-4643-dd5d-3a0256522008","PostLogOutUri":null,"State":null,"Raw":{"post_logout_redirect_uri":"https://localhost:44321/signout-callback-oidc","id_token_hint":"***REDACTED***","state":"CfDJ8Oes8R5tY-pEgD3odznXSRMn-fTbkNR-JqFNB68bvcgJFfBQWtMAM9Who9bz3K4rTLlEkLsApGll7oN0ONXjtD32iwT0kLu3GGGIKsItv-2uF73cEkrOi3DIDnytx9kRZagz_504ACITYmQn-Im9FC0","x-client-SKU":"ID_NETSTANDARD2_0","x-client-ver":"6.7.1.0"},"$type":"EndSessionRequestValidationLog"} 2023-01-09 14:07:56.998 +03:00 [DBG] Success validating end session request from Mbb_MicroService_Web 2023-01-09 14:07:57.003 +03:00 [INF] Request finished HTTP/2 GET https://localhost:44322/connect/endsession?post_logout_redirect_uri=https%3A%2F%2Flocalhost%3A44321%2Fsignout-callback-oidc&id_token_hint=eyJhbGciOiJSUzI...................................................... Qn-Im9FC0&x-client-SKU=ID_NETSTANDARD2_0&x-client-ver=6.7.1.0 - - - 302 0 - 25.5234ms 2023-01-09 14:07:57.006 +03:00 [INF] Request starting HTTP/2 GET https://localhost:44322/Account/Logout?logoutId=CfDJ8Oes8R5tY-pEgD3odznXSRNXeZPYBmofVO6UWUZIngsfFZwpMLPvGaWGMlT5esC9_WJwEy5PpvSX_m01g-GO1IO0tuVwiigP_W67AAQHYurMwBrlYEy86EgcVMLrZoHXn-k0hIS4R8_Nr1Wqp0OJYHgT6Gbw3SmFYos0Ul43JvK7P9mfmYJZPQ-tXd-2-t3ctjX30Ylvir2VxKLmew3pAVxI2MXM4VhLWlg9aqbuDOYFy3tAlM_aq8NrmC5XHNo1Y0znbaOtjRG7LLP0WoSCNeMYc3xEETmryJGJAcNmxfnW6eVtDyITu-uOSKXbba4yTI81iSN0Rfyo5-cYz8ojUCv66PQ6_ISKFRiuz9u_aX9oLiU57im4Jnf5ZG2LoKFkGugAWUPBmAKLC1QxEpUEgRW7GZX8DYSRsMU1Y4x8Lrs9Mmw-B9g0GOwE_IDkVVHJSg61UB155Fr0dzMcD3DC0WZBWMEmGGKy6xEUZ5bDnjIh2W6mpvKign597NtwK8d7S_F2t3erANbcvJm7Qny4bTZEhDUPDUo6rzusTFdqRc2O - - 2023-01-09 14:07:57.013 +03:00 [INF] Executing endpoint '/Account/Logout' 2023-01-09 14:07:57.014 +03:00 [INF] Route matched with {page = "/Account/Logout", area = "", action = "", controller = ""}. Executing page /Account/Logout 2023-01-09 14:07:57.014 +03:00 [INF] Skipping the execution of current filter as its not the most effective filter implementing the policy Microsoft.AspNetCore.Mvc.ViewFeatures.IAntiforgeryPolicy 2023-01-09 14:07:57.020 +03:00 [INF] Executing handler method Volo.Abp.Account.Public.Web.Pages.Account.LogoutModel.OnGetAsync - ModelState is "Valid" 2023-01-09 14:07:57.022 +03:00 [INF] AuthenticationScheme: Identity.Application signed out. 2023-01-09 14:07:57.023 +03:00 [INF] AuthenticationScheme: Identity.External signed out. 2023-01-09 14:07:57.023 +03:00 [INF] AuthenticationScheme: Identity.TwoFactorUserId signed out. 2023-01-09 14:07:57.038 +03:00 [DBG] Added 0 entity changes to the current audit log 2023-01-09 14:07:57.038 +03:00 [DBG] Added 0 entity changes to the current audit log 2023-01-09 14:07:57.040 +03:00 [INF] AuthenticationScheme: Identity.Application signed out. 2023-01-09 14:07:57.040 +03:00 [INF] AuthenticationScheme: Identity.External signed out. 2023-01-09 14:07:57.041 +03:00 [INF] AuthenticationScheme: Identity.TwoFactorUserId signed out. 2023-01-09 14:07:57.041 +03:00 [INF] Redirecting to LoggedOut Page... 2023-01-09 14:07:57.042 +03:00 [INF] Executed handler method OnGetAsync, returned result Microsoft.AspNetCore.Mvc.RedirectToPageResult. 2023-01-09 14:07:57.043 +03:00 [INF] Executing RedirectToPageResult, redirecting to ./LoggedOut. 2023-01-09 14:07:57.043 +03:00 [INF] Executed page /Account/Logout in 28.9443ms 2023-01-09 14:07:57.043 +03:00 [INF] Executed endpoint '/Account/Logout' 2023-01-09 14:07:57.044 +03:00 [DBG] SignOutCalled set; processing post-signout session cleanup. 2023-01-09 14:07:57.054 +03:00 [DBG] client configuration validation for client Mbb_MicroService_Web succeeded. 2023-01-09 14:07:57.054 +03:00 [DBG] Client back-channel logout URLs: https://uygulama.mugla.bel.tr/ 2023-01-09 14:07:57.070 +03:00 [INF] Start processing HTTP request POST "https://uygulama.mugla.bel.tr/" 2023-01-09 14:07:57.071 +03:00 [INF] Sending HTTP request POST "https://uygulama.mugla.bel.tr/" 2023-01-09 14:07:58.359 +03:00 [INF] Received HTTP response headers after 1285.6596ms - 400 2023-01-09 14:07:58.359 +03:00 [INF] End processing HTTP request after 1289.8485ms - 400 2023-01-09 14:07:58.360 +03:00 [WRN] Response from back-channel logout endpoint: https://uygulama.mugla.bel.tr/ status code: 400 2023-01-09 14:07:58.361 +03:00 [INF] Request finished HTTP/2 GET https://localhost:44322/Account/Logout?logoutId=CfDJ8Oes8R5............................................... Rc2O - - - 302 0 - 1354.4820ms 2023-01-09 14:07:58.365 +03:00 [INF] Request starting HTTP/2 GET https://localhost:44322/Account/LoggedOut?ClientName=Mbb_MicroService_Web&SignOutIframeUrl=https%3A%2F%2Flocalhost%3A44322%2Fconnect%2Fendsession%2Fcallback%3FendSessionId%3DCfDJ8Oes8R5tY-pEgD3odznXSRPfpsCqBAUMt-GbrMiDi3xCdIAeS2SEYHXvtCzHaAMFbMtXere-M46hlMSzgQF4BhzFuZdKlAJZqLMCUDgZKaY09bIMwG7IPJzVbowHMVODLhfH7LvA48Tdm2pOhxQhp4ABN0ijvgZnPM-WYo021su0yBDJfTb7sc-tlFp_ULvRYWm4Pi2J-XROpR8aVeqW29pFPkBmG7nG6e-2LrI490LEdqyAsSo2IbVXJpwNx3TzOTs01Gui9xWPF9_YkYX2hWTp7z-4mYSgi3chTvfYLr63tGKdiFbSKal5xMr389G8xTil6d6oyGiYmgeop7qlOpM&PageContext=Microsoft.AspNetCore.Mvc.RazorPages.PageContext - - 2023-01-09 14:07:58.369 +03:00 [INF] Executing endpoint '/Account/LoggedOut' 2023-01-09 14:07:58.371 +03:00 [INF] Route matched with {page = "/Account/LoggedOut", area = "", action = "", controller = ""}. Executing page /Account/LoggedOut 2023-01-09 14:07:58.371 +03:00 [INF] Skipping the execution of current filter as its not the most effective filter implementing the policy Microsoft.AspNetCore.Mvc.ViewFeatures.IAntiforgeryPolicy 2023-01-09 14:07:58.377 +03:00 [INF] Executing handler method Volo.Abp.Account.Public.Web.Pages.Account.LoggedOutModel.OnGetAsync - ModelState is "Valid" 2023-01-09 14:07:58.377 +03:00 [INF] Executed handler method OnGetAsync, returned result Microsoft.AspNetCore.Mvc.RazorPages.PageResult. 2023-01-09 14:07:58.403 +03:00 [DBG] Added bundle 'Lepton.Global' to the page in 9,73 ms. 2023-01-09 14:07:58.409 +03:00 [DBG] Added bundle 'Pages.Account.LoggedOut' to the page in 0,67 ms. 2023-01-09 14:07:58.422 +03:00 [DBG] Added bundle 'Lepton.Global' to the page in 3,32 ms. 2023-01-09 14:07:58.425 +03:00 [DBG] Added bundle 'Volo.Abp.Account.Public.Web.Pages.Account.LoggedOutModel' to the page in 0,42 ms. 2023-01-09 14:07:58.426 +03:00 [INF] Executed page /Account/LoggedOut in 54.9365ms 2023-01-09 14:07:58.426 +03:00 [INF] Executed endpoint '/Account/LoggedOut' 2023-01-09 14:07:58.426 +03:00 [INF] Request finished HTTP/2 GET https://localhost:44322/Account/LoggedOut?ClientName=Mbb_MicroService_Web&SignOutIframeUrl=https%3A%2F%2Flocalhost%3A44322%2Fconnect%2Fendsession%2Fcallback%3FendSessionId%3DCfDJ8Oes8R5tY-pEgD3odznXSRPfpsCqBAUMt-GbrMiDi3xCdIAeS2SEYHXvtCzHaAMFbMtXere-M46hlMSzgQF4BhzFuZdKlAJZqLMCUDgZKaY09bIMwG7IPJzVbowHMVODLhfH7LvA48Tdm2pOhxQhp4ABN0ijvgZnPM-WYo021su0yBDJfTb7sc-tlFp_ULvRYWm4Pi2J-XROpR8aVeqW29pFPkBmG7nG6e-2LrI490LEdqyAsSo2IbVXJpwNx3TzOTs01Gui9xWPF9_YkYX2hWTp7z-4mYSgi3chTvfYLr63tGKdiFbSKal5xMr389G8xTil6d6oyGiYmgeop7qlOpM&PageContext=Microsoft.AspNetCore.Mvc.RazorPages.PageContext - - - 200 - text/html;+charset=utf-8 61.1066ms 2023-01-09 14:07:58.492 +03:00 [INF] Request starting HTTP/2 GET https://localhost:44322/Abp/ApplicationConfigurationScript - - 2023-01-09 14:07:58.493 +03:00 [INF] Request starting HTTP/2 GET https://localhost:44322/Abp/ServiceProxyScript - - 2023-01-09 14:07:58.498 +03:00 [INF] Request starting HTTP/2 GET https://localhost:44322/connect/endsession/callback?endSessionId=CfDJ8Oes8R5tY-pEgD3odznXSRPfpsCqBAUMt-GbrMiDi3xCdIAeS2SEYHXvtCzHaAMFbMtXere-M46hlMSzgQF4BhzFuZdKlAJZqLMCUDgZKaY09bIMwG7IPJzVbowHMVODLhfH7LvA48Tdm2pOhxQhp4ABN0ijvgZnPM-WYo021su0yBDJfTb7sc-tlFp_ULvRYWm4Pi2J-XROpR8aVeqW29pFPkBmG7nG6e-2LrI490LEdqyAsSo2IbVXJpwNx3TzOTs01Gui9xWPF9_YkYX2hWTp7z-4mYSgi3chTvfYLr63tGKdiFbSKal5xMr389G8xTil6d6oyGiYmgeop7qlOpM - - 2023-01-09 14:07:58.498 +03:00 [INF] Executing endpoint 'Volo.Abp.AspNetCore.Mvc.ProxyScripting.AbpServiceProxyScriptController.GetAll (Volo.Abp.AspNetCore.Mvc)' 2023-01-09 14:07:58.498 +03:00 [INF] Executing endpoint 'Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.AbpApplicationConfigurationScriptController.Get (Volo.Abp.AspNetCore.Mvc)' 2023-01-09 14:07:58.499 +03:00 [INF] Route matched with {area = "Abp", action = "GetAll", controller = "AbpServiceProxyScript", page = ""}. Executing controller action with signature Microsoft.AspNetCore.Mvc.ActionResult GetAll(Volo.Abp.AspNetCore.Mvc.ProxyScripting.ServiceProxyGenerationModel) on controller Volo.Abp.AspNetCore.Mvc.ProxyScripting.AbpServiceProxyScriptController (Volo.Abp.AspNetCore.Mvc). 2023-01-09 14:07:58.499 +03:00 [INF] Route matched with {area = "Abp", action = "Get", controller = "AbpApplicationConfigurationScript", page = ""}. Executing controller action with signature System.Threading.Tasks.Task`1[Microsoft.AspNetCore.Mvc.ActionResult] Get() on controller Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.AbpApplicationConfigurationScriptController (Volo.Abp.AspNetCore.Mvc). 2023-01-09 14:07:58.501 +03:00 [INF] Executing action method Volo.Abp.AspNetCore.Mvc.ProxyScripting.AbpServiceProxyScriptController.GetAll (Volo.Abp.AspNetCore.Mvc) - Validation state: "Valid" 2023-01-09 14:07:58.501 +03:00 [INF] Executing action method Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.AbpApplicationConfigurationScriptController.Get (Volo.Abp.AspNetCore.Mvc) - Validation state: "Valid" 2023-01-09 14:07:58.502 +03:00 [INF] Executed action method Volo.Abp.AspNetCore.Mvc.ProxyScripting.AbpServiceProxyScriptController.GetAll (Volo.Abp.AspNetCore.Mvc), returned result Microsoft.AspNetCore.Mvc.ContentResult in 1.2737ms. 2023-01-09 14:07:58.502 +03:00 [INF] Executing ContentResult with HTTP Response ContentType of application/javascript 2023-01-09 14:07:58.503 +03:00 [DBG] Request path /connect/endsession/callback matched to endpoint type Endsession 2023-01-09 14:07:58.503 +03:00 [INF] Executed action Volo.Abp.AspNetCore.Mvc.ProxyScripting.AbpServiceProxyScriptController.GetAll (Volo.Abp.AspNetCore.Mvc) in 4.0205ms 2023-01-09 14:07:58.503 +03:00 [INF] Executed endpoint 'Volo.Abp.AspNetCore.Mvc.ProxyScripting.AbpServiceProxyScriptController.GetAll (Volo.Abp.AspNetCore.Mvc)' 2023-01-09 14:07:58.503 +03:00 [INF] Request finished HTTP/2 GET https://localhost:44322/Abp/ServiceProxyScript - - - 200 32066 application/javascript 10.3165ms 2023-01-09 14:07:58.503 +03:00 [DBG] Executing AbpApplicationConfigurationAppService.GetAsync()... 2023-01-09 14:07:58.505 +03:00 [DBG] Endpoint enabled: Endsession, successfully created handler: IdentityServer4.Endpoints.EndSessionCallbackEndpoint 2023-01-09 14:07:58.506 +03:00 [INF] Invoking IdentityServer endpoint: IdentityServer4.Endpoints.EndSessionCallbackEndpoint for /connect/endsession/callback 2023-01-09 14:07:58.511 +03:00 [DBG] Processing signout callback request 2023-01-09 14:07:58.538 +03:00 [DBG] client configuration validation for client Mbb_MicroService_Web succeeded. 2023-01-09 14:07:58.539 +03:00 [DBG] Client front-channel logout URLs: https://uygulama.mugla.bel.tr/?sid=904378A2F16B397919ED8A6CC3886B5A&iss=https%3A%2F%2Flocalhost%3A44322 2023-01-09 14:07:58.540 +03:00 [INF] Successful signout callback.
-
0
hi
Can you share a project that reproduces the issue?
liming.ma@volosoft.com
-
0
Hi. I cant reproduce the issue now. Can you share basic algorithm steps of logout function in abp commercial microservice architecture? so I can follow the settings and parameters needed to check. Which steps are followed imn basic when I click logout?
-
0
Actually problem case is all stable because when we click logout we have the same screen with same message. It is not redirecting us to main page with a long url written on browser and redirecting message on screen.
we have this error log on console: Volo.Abp.Account.Public.Web.Pages.Account.LoggedOutModel.EDDCA25265E1322DDB0FD797A7078293.js?_v=638089242017229999:1 Uncaught TypeError: Cannot read properties of null (reading 'getAttribute') at Volo.Abp.Account.Public.Web.Pages.Account.LoggedOutModel.EDDCA25265E1322DDB0FD797A7078293.js?_v=638089242017229999:1:138 (anonymous) @ Volo.Abp.Account.Public.Web.Pages.Account.LoggedOutModel.EDDCA25265E1322DDB0FD797A7078293.js?_v=638089242017229999:1 setTimeout (async) (anonymous) @ Volo.Abp.Account.Public.Web.Pages.Account.LoggedOutModel.EDDCA25265E1322DDB0FD797A7078293.js?_v=638089242017229999:1
which setting can cause this console error log?
-
0
The cshtml and javascript code are below.
<abp-card-title>@L["LoggedOutTitle"]</abp-card-title> <abp-card-text>@L["LoggedOutText"]</abp-card-text> @if (Model.PostLogoutRedirectUri != null) { <a abp-button="Primary" id="redirectButton" href="@Html.Encode(Model.PostLogoutRedirectUri)" cname="@Model.ClientName">@L["ReturnToText"]</a> } @if (Model.SignOutIframeUrl != null) { <iframe class="signout logoutiframe" src="@Html.Encode(Model.SignOutIframeUrl)"></iframe> } document.addEventListener("DOMContentLoaded", function (event) { setTimeout(function () { window.clientName = document.getElementById("redirectButton").getAttribute("cname"); window.location = document.getElementById("redirectButton").getAttribute("href"); }, 3000) });
-
0
I couldnt find these code parts in my project. Which files and folders do this progress?
-
0
hi
Can you share a project to reproduce the problem? liming.ma@volosoft.com
-
0
Can you share which files have these code parts that you shared above.?
-
0
The cshtml and javascript code belong Account Pro module.
You can download the module source code to test it.