Skip to content

Commit

Permalink
Fixing issues after testing
Browse files Browse the repository at this point in the history
  • Loading branch information
WorldWideWest committed Apr 13, 2024
1 parent b07dd67 commit 17ccc6f
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/Template.Api/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

builder
.Configuration.SetBasePath(builder.Environment.ContentRootPath)
.AddJsonFile($"appsettings.{builder.Environment.EnvironmentName}.json", optional: true)
.AddJsonFile($"appsettings.Internal.json", optional: true)
.AddEnvironmentVariables();

builder.Services.AddApi().AddInfrastructure(builder.Configuration).AddApplication();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,6 @@ IConfiguration configuration
}
);
// MARK: Add default authentication handlers
var defaultAuthorizationPolicy = new AuthorizationPolicyBuilder(
JwtBearerDefaults.AuthenticationScheme,
GoogleDefaults.AuthenticationScheme,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -271,10 +271,8 @@ public async Task<Result<object>> RegisterExternalAsync(AuthenticateResult resul

var info = new UserLoginInfo(provider, userId, provider);

var addLogin = _userManager.AddLoginAsync(user, info);
var signIn = _signInManager.SignInAsync(user, isPersistent: false);

await Task.WhenAll(addLogin, signIn).ConfigureAwait(false);
await _userManager.AddLoginAsync(user, info);
await _signInManager.SignInAsync(user, isPersistent: false);

return Result<object>.Success();
}
Expand Down

0 comments on commit 17ccc6f

Please sign in to comment.