fixed oidc not using https callbacks

This commit is contained in:
Mia Rose Winter 2024-03-11 16:03:20 +01:00
parent 587d6cafc2
commit 30b5429e11
Signed by: miawinter
GPG key ID: 4B6F6A83178F595E

View file

@ -125,6 +125,15 @@
options.CallbackPath = new PathString("/signin-oidc"); options.CallbackPath = new PathString("/signin-oidc");
options.SignedOutCallbackPath = new PathString("/signout-callback-oidc"); options.SignedOutCallbackPath = new PathString("/signout-callback-oidc");
options.RemoteSignOutPath = new PathString("/signout-oidc"); options.RemoteSignOutPath = new PathString("/signout-oidc");
options.Events.OnRedirectToIdentityProvider = context => {
var uri = new UriBuilder(context.ProtocolMessage.RedirectUri) {
Scheme = "https",
Port = -1
};
context.ProtocolMessage.RedirectUri = uri.ToString();
return Task.FromResult(0);
};
}); });
} }