#oauth changed GoogleController for the jwt flow ( using a common token if we connect from our app or from google )

This commit is contained in:
Dominic Villemure
2024-06-09 23:44:37 -04:00
parent ac87aeb4c4
commit 6f76cb2084
16 changed files with 338 additions and 842 deletions

View File

@@ -48,13 +48,20 @@ public static class DependencyInjection
.AddBearerToken(IdentityConstants.BearerScheme);
services.AddAuthorizationBuilder();
// Might need to change and use AddIdentity<User, Role>() when we need to integrate connection via third party ( facebook, google )
services
.AddIdentityCore<ApplicationUser>()
services.AddIdentityCore<ApplicationUser>(options =>
{
options.Password.RequireDigit = false;
options.Password.RequireLowercase = false;
options.Password.RequireUppercase = false;
options.Password.RequireNonAlphanumeric = false;
options.Password.RequiredLength = 8;
})
.AddRoles<IdentityRole>()
.AddEntityFrameworkStores<ApplicationDbContext>()
.AddApiEndpoints();
.AddApiEndpoints()
.AddSignInManager<SignInManager<ApplicationUser>>()
.AddDefaultTokenProviders();
services.AddSingleton(TimeProvider.System);
services.AddScoped<IIdentityService, IdentityService>();