Compare commits
No commits in common. "ef1df0b06547cf3d3a64e4d639edec419abafd5d" and "b58827b724ef5c3bee8aa9ad9066decf4fa32cbd" have entirely different histories.
ef1df0b065
...
b58827b724
@ -78,21 +78,11 @@ builder.Services.AddAuthentication(options =>
|
|||||||
var msAuth = builder.Configuration.GetSection("Authentication:Microsoft");
|
var msAuth = builder.Configuration.GetSection("Authentication:Microsoft");
|
||||||
options.ClientId = msAuth["ClientId"] ?? "";
|
options.ClientId = msAuth["ClientId"] ?? "";
|
||||||
options.ClientSecret = msAuth["ClientSecret"] ?? "";
|
options.ClientSecret = msAuth["ClientSecret"] ?? "";
|
||||||
options.CallbackPath = "/signin-microsoft";
|
|
||||||
|
|
||||||
// Força seleção de conta a cada login
|
// Força seleção de conta a cada login
|
||||||
options.AuthorizationEndpoint = "https://login.microsoftonline.com/common/oauth2/v2.0/authorize";
|
options.AuthorizationEndpoint = "https://login.microsoftonline.com/common/oauth2/v2.0/authorize";
|
||||||
options.TokenEndpoint = "https://login.microsoftonline.com/common/oauth2/v2.0/token";
|
options.TokenEndpoint = "https://login.microsoftonline.com/common/oauth2/v2.0/token";
|
||||||
|
|
||||||
if (!builder.Environment.IsDevelopment())
|
|
||||||
{
|
|
||||||
options.Events.OnRedirectToAuthorizationEndpoint = context =>
|
|
||||||
{
|
|
||||||
context.RedirectUri = context.RedirectUri.Replace("http://", "https://");
|
|
||||||
return Task.CompletedTask;
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
options.Events = new OAuthEvents
|
options.Events = new OAuthEvents
|
||||||
{
|
{
|
||||||
OnRedirectToAuthorizationEndpoint = context =>
|
OnRedirectToAuthorizationEndpoint = context =>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user