- Steps to reproduce the issueTenant subdomain logout is not working. Tenant stays logged in always:
116 Answer(s)
-
0
Still 400 error Please clear the cache and resend the logs.
Thanks.
-
0
Yes, Will clear and send you update.
-
0
Pls check now, no 400 error but not working to logout
-
0
hi
Your
endsession
request was sent tohttps://auth.approach.cpat.dev/connect/endsession
instead ofhttps://cpattest.auth.approach.cpat.dev/connect/endsession
Try to change
IssuerAddress
:.AddAbpOpenIdConnect("oidc", options => { options.Authority = configuration["AuthServer:Authority"]; options.RequireHttpsMetadata = configuration.GetValue<bool>("AuthServer:RequireHttpsMetadata"); //... options.Events.OnRedirectToIdentityProviderForSignOut = redirectContext => { //Check current tenant here, and set the IssuerAddress accordingly var currentTenant = redirectContext.HttpContext.RequestServices.GetRequiredService<ICurrentTenant>(); redirectContext.ProtocolMessage.IssuerAddress = "https://cpattest.auth.approach.cpat.dev"; return System.Threading.Tasks.Task.CompletedTask; }; });
-
0
[sghorakavi@cpat.com] said: Yes, Will clear and send you update.
Cache is cleared. Checking above code.
-
0
[maliming] said: OnRedirectToIdentityProviderForSignOut
Current code : We have code to handle tenant based on tenant name and wildcard information `options.Events.OnRedirectToIdentityProviderForSignOut = ctx => { ctx.ProtocolMessage.PostLogoutRedirectUri = ctx.ProtocolMessage.PostLogoutRedirectUri.Replace("http://", "https://"); // Intercept the redirection for signout so the browser navigates to the right URL in your host ctx.ProtocolMessage.IssuerAddress = "https://" + configuration["WildcardDomains:AuthServer"]! + "/connect/logout";
var currentTenant = ctx.HttpContext.RequestServices.GetRequiredService<ICurrentTenant>(); var tenantDomain = "https://" + configuration["WildcardDomains:Web"]; if (currentTenant.IsAvailable && !string.IsNullOrEmpty(tenantDomain)) { ctx.ProtocolMessage.IssuerAddress = ctx.ProtocolMessage.IssuerAddress.Replace("{0}", $"{currentTenant.Name}"); } else { ctx.ProtocolMessage.IssuerAddress = ctx.ProtocolMessage.IssuerAddress.Replace("{0}.", string.Empty); } return Task.CompletedTask;
};`
-
0
[maliming] said: redirectContext.ProtocolMessage.IssuerAddress = "https://cpattest.auth.approach.cpat.dev";
I think, we have issue in
ctx.ProtocolMessage.PostLogoutRedirectUri = "https://myapp.com/";
Let me remove "/connect/logout"; and retry
-
0
[sghorakavi@cpat.com] said:
[maliming] said: redirectContext.ProtocolMessage.IssuerAddress = "https://cpattest.auth.approach.cpat.dev";
I think, we have issue in
ctx.ProtocolMessage.PostLogoutRedirectUri = "https://myapp.com/";
Let me remove "/connect/logout"; and retry
Added
connect/endsession
and it seems to be working locally. I need to test on deployed code.Question: We updated DB to include http and tenant. Is there any call to API to update
[OpenIddictApplications]
table ? -
0
[sghorakavi@cpat.com] said: "https://cpattest.auth.approach.cpat.dev";
"https://cpattest.auth.approach.cpat.dev" is working because I updated [OpenIddictApplications] table, [OpenIddictApplications] column with http and https values and https value in [RedirectUris] manually. How can I update DB table with the code ?
-
0
-
0
Thank you for UI change suggestion. I still think, we should change DB in the background. Any suggestions ?
Also, you can see the issue : https://abp.io/support/questions/9700/ExternalProviderSettingsHelper-after-upgrade-to-923-from-904-not-working
It is still not working. Can you unlock that tkt as well.
-
0
Hi
You can inject AbpApplicationManager to update application/client entity.
https://abp.io/docs/latest/modules/openiddict#database-providers
-
0
[maliming] said: AbpApplicationManager
Thank you, I will try this.
-
0
Ok
-
0
Thank you for UI change suggestion. I still think, we should change DB in the background. Let me see if I should access DBContext and change the columns.
Seems to be working with DB Change. Thank you
-
0
Great : )