Merge pull request 'feat/plano-rodape' (#14) from feat/plano-rodape into main
All checks were successful
BCards Deployment Pipeline / Run Tests (push) Successful in 2s
BCards Deployment Pipeline / PR Validation (push) Has been skipped
BCards Deployment Pipeline / Build and Push Image (push) Successful in 7m7s
BCards Deployment Pipeline / Deploy to Production (ARM - OCI) (push) Successful in 3m5s
BCards Deployment Pipeline / Deploy to Staging (x86 - Local) (push) Has been skipped
BCards Deployment Pipeline / Cleanup Old Resources (push) Has been skipped
BCards Deployment Pipeline / Deployment Summary (push) Successful in 1s
All checks were successful
BCards Deployment Pipeline / Run Tests (push) Successful in 2s
BCards Deployment Pipeline / PR Validation (push) Has been skipped
BCards Deployment Pipeline / Build and Push Image (push) Successful in 7m7s
BCards Deployment Pipeline / Deploy to Production (ARM - OCI) (push) Successful in 3m5s
BCards Deployment Pipeline / Deploy to Staging (x86 - Local) (push) Has been skipped
BCards Deployment Pipeline / Cleanup Old Resources (push) Has been skipped
BCards Deployment Pipeline / Deployment Summary (push) Successful in 1s
Reviewed-on: http://git.carneiro.ddnsfree.com/ricardo/BCards/pulls/14
This commit is contained in:
commit
ef1df0b065
@ -78,11 +78,21 @@ builder.Services.AddAuthentication(options =>
|
||||
var msAuth = builder.Configuration.GetSection("Authentication:Microsoft");
|
||||
options.ClientId = msAuth["ClientId"] ?? "";
|
||||
options.ClientSecret = msAuth["ClientSecret"] ?? "";
|
||||
options.CallbackPath = "/signin-microsoft";
|
||||
|
||||
// Força seleção de conta a cada login
|
||||
options.AuthorizationEndpoint = "https://login.microsoftonline.com/common/oauth2/v2.0/authorize";
|
||||
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
|
||||
{
|
||||
OnRedirectToAuthorizationEndpoint = context =>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user