Index: iknow-api/Program.cs
===================================================================
--- iknow-api/Program.cs	(revision 3347c1b709ebb3bce2d308c2a77f0e13470fc799)
+++ iknow-api/Program.cs	(revision c72ed3b23baa7503aaa3243fa119d9ee75b21ab9)
@@ -1,49 +1,10 @@
-using System.Text;
-using iknow_api.Data;
-using iknow_api.Repositories;
-using iknow_api.Services;
-using Microsoft.AspNetCore.Authentication.JwtBearer;
-using Microsoft.EntityFrameworkCore;
-using Microsoft.IdentityModel.Tokens;
+var builder = WebApplication.CreateBuilder(args);
 
-var builder = WebApplication.CreateBuilder(args);
-builder.Services.AddAuthentication(options =>
-{
-    options.DefaultAuthenticateScheme = JwtBearerDefaults.AuthenticationScheme;
-    options.DefaultChallengeScheme = JwtBearerDefaults.AuthenticationScheme;
-})
-.AddJwtBearer(options =>
-{
-    options.RequireHttpsMetadata = false; // only for development
-    options.SaveToken = true;
-    options.TokenValidationParameters = new TokenValidationParameters
-    {
-        ValidateIssuer = true,
-        ValidIssuer = "iknow-api",
+// Add services to the container.
 
-        ValidateAudience = true,
-        ValidAudience = "iknow-api",
-
-        ValidateLifetime = true,
-
-        ValidateIssuerSigningKey = true,
-        IssuerSigningKey = new SymmetricSecurityKey(
-            Encoding.UTF8.GetBytes(builder.Configuration["Jwt:Key"]))
-    };
-});
-// Add services to the container.
 builder.Services.AddControllers();
+// Learn more about configuring OpenAPI at https://aka.ms/aspnet/openapi
 builder.Services.AddOpenApi();
 
-// Register DbContext
-builder.Services.AddDbContext<AppDbContext>(options =>
-    options.UseNpgsql(builder.Configuration.GetConnectionString("DefaultConnection")));
-
-// Register your services
-builder.Services.AddScoped<IAuthService, AuthService>();
-builder.Services.AddScoped<IRefreshTokenService, RefreshTokenService>();
-builder.Services.AddScoped<IUserRepository, UserRepository>(); 
-builder.Services.AddScoped<IRefreshTokenRepository, RefreshTokenRepository>(); 
-builder.Services.AddAuthorization();
 var app = builder.Build();
 
@@ -55,6 +16,7 @@
 
 app.UseHttpsRedirection();
-app.UseAuthentication(); // <-- must come BEFORE UseAuthorization
+
 app.UseAuthorization();
+
 app.MapControllers();
 
