This commit is contained in:
@@ -41,19 +41,6 @@ public static class Api
|
|||||||
options.Scope.Add("openid");
|
options.Scope.Add("openid");
|
||||||
options.Scope.Add("profile");
|
options.Scope.Add("profile");
|
||||||
options.Scope.Add("email");
|
options.Scope.Add("email");
|
||||||
|
|
||||||
options.Events = new OpenIdConnectEvents
|
|
||||||
{
|
|
||||||
OnRedirectToIdentityProvider = context =>
|
|
||||||
{
|
|
||||||
var fallbackUri = context.ProtocolMessage.RedirectUri;
|
|
||||||
|
|
||||||
if (fallbackUri.StartsWith("http://", StringComparison.OrdinalIgnoreCase))
|
|
||||||
context.ProtocolMessage.RedirectUri = fallbackUri.Replace("http://", "https://", StringComparison.OrdinalIgnoreCase);
|
|
||||||
|
|
||||||
return Task.CompletedTask;
|
|
||||||
}
|
|
||||||
};
|
|
||||||
});
|
});
|
||||||
|
|
||||||
return services;
|
return services;
|
||||||
|
|||||||
Reference in New Issue
Block a user