Closed williambowsher closed 4 years ago
Hi, I am prepping a release with better 3.1 support for later this week. Not sure if that alone would resolve this for you.
Can you post your ConfigureServices or at least the multitenant part of it?
Here is my Finbuckle config
services.AddMultiTenant()
.WithRouteStrategy()
.WithInMemoryStore(configuration.GetSection("Finbuckle:MultiTenant:InMemoryStore"))
.WithRemoteAuthentication()
.WithPerTenantOptions<CookieAuthenticationOptions>((options, tenantContext) =>
{
// Set a unique cookie name for this tenant.
options.Cookie.Name += tenantContext.Identifier.ToLower() + "-cookie";
// Note the paths set take our routing strategy into account.
options.LoginPath = "/" + tenantContext.Identifier + "/Home";
options.LogoutPath = "/" + tenantContext.Identifier + "/Logout";
options.Cookie.Path = "/" + tenantContext.Identifier;
})
.WithPerTenantOptions<OpenIdConnectOptions>((options, tenantContext) =>
{
options.CallbackPath = "/" + tenantContext.Identifier + "/signin-oidc";
options.SignedOutCallbackPath = "/" + tenantContext.Identifier + "/Logout";
options.SignedOutRedirectUri = "/" + tenantContext.Identifier + "/Logout";
});
Thanks! And if you simply change the Asp.NET Core version back to 2.2 does it work again?
Oh I just noticed your callback path! Try it with the default callback path, the library has special handing for openid connect callback and you shouldn’t Need to set it per tenant (because the identity server only knows the main callback url).
Yeah this is a new branch for 3.1 upgrade, the existing 2.2.7 version is up and running.
On Tue, 7 Jan 2020, 18:45 Andrew White, notifications@github.com wrote:
Thanks! And if you simply change the Asp.NET Core version back to 2.2 does it work again?
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/Finbuckle/Finbuckle.MultiTenant/issues/205?email_source=notifications&email_token=AFICAZ6NR2YMHXZ37YHJZULQ4S5T7A5CNFSM4KD4BIYKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEIJV7BY#issuecomment-571694983, or unsubscribe https://github.com/notifications/unsubscribe-auth/AFICAZ6HYV5FCYMNCDIDTH3Q4S5T7ANCNFSM4KD4BIYA .
Ok I will give that ago, thanks for the great work and quick response time on questions.
On Tue, 7 Jan 2020, 18:47 Andrew White, notifications@github.com wrote:
Oh I just noticed your callback path! Try it with the default callback path, the library has special handing of opened connect callback and you shouldn’t set it per tenant (because the identity server only knows the main callback url).
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/Finbuckle/Finbuckle.MultiTenant/issues/205?email_source=notifications&email_token=AFICAZ4IJNJDFP5ASBMP3ZTQ4S52NA5CNFSM4KD4BIYKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEIJWEKI#issuecomment-571695657, or unsubscribe https://github.com/notifications/unsubscribe-auth/AFICAZZURJG6AJ7AEY3OQ73Q4S52NANCNFSM4KD4BIYA .
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Hi,
I have just upgraded my application from .NET Core 2.2.7 to 3.1 LTS and I have the following issue. I opening the application and it resolved the tenant correctly, then I login in, which redirect to IdentityServer 4, upon successfully logging in it redirects back to my application at which point the tenant can no longer be resolved.
I was just wondering if there are any important issue with a .NET Core 3.1 implementation?
This is an extract from my log file:
2020-01-06 07:09:10.092 +01:00 [Information] Request starting HTTP/2.0 GET https://localhost:44335/tenant1/Home/EmployeeHome
2020-01-06 07:09:10.095 +01:00 [Information] Finbuckle.MultiTenant.Strategies.RouteStrategy.GetIdentifierAsync: Found identifier: "tenant1". 2020-01-06 07:09:10.095 +01:00 [Information] Finbuckle.MultiTenant.Stores.InMemoryStore.TryGetByIdentifierAsync: Tenant found with identifier "tenant1". 2020-01-06 07:09:10.102 +01:00 [Information] Authorization failed. 2020-01-06 07:09:10.430 +01:00 [Information] AuthenticationScheme: "oidc" was challenged. 2020-01-06 07:09:10.432 +01:00 [Information] Request finished in 339.7645ms 302 2020-01-06 07:09:13.211 +01:00 [Information] Request starting HTTP/2.0 POST https://localhost:44335/tenant1/signin-oidc application/x-www-form-urlencoded 1579 2020-01-06 07:09:13.212 +01:00 [Information] Finbuckle.MultiTenant.Strategies.RouteStrategy.GetIdentifierAsync: No identifier found.