chore(configuration): Update appsettings for development and production environments

- Modified logging levels in `appsettings.Development.json` to enhance log visibility.
- Added Serilog configuration for structured logging and console output.
- Updated Redis connection settings for improved security and performance.
- Introduced email configuration settings for SMTP integration.
- Added two-factor authentication settings and social login configurations for Google and Facebook.
- Updated the default connection string in `appsettings.json` to match the new database setup.
This commit is contained in:
Ho Ngoc Hai
2026-01-13 18:56:59 +07:00
parent c23c35844e
commit 38aaf72be2
2 changed files with 63 additions and 6 deletions

View File

@@ -1,16 +1,47 @@
{
"Logging": {
"LogLevel": {
"Default": "Debug",
"Microsoft.AspNetCore": "Information",
"Microsoft.EntityFrameworkCore": "Information"
"Default": "Information",
"Microsoft.AspNetCore": "Warning",
"Microsoft.EntityFrameworkCore": "Warning"
}
},
"Serilog": {
"MinimumLevel": {
"Default": "Information",
"Override": {
"Microsoft": "Warning",
"Microsoft.EntityFrameworkCore": "Warning",
"System": "Warning"
}
},
"WriteTo": [
{
"Name": "Console",
"Args": {
"outputTemplate": "[{Timestamp:HH:mm:ss} {Level:u3}] {Message:lj} {Properties:j}{NewLine}{Exception}"
}
}
],
"Enrich": [
"FromLogContext",
"WithMachineName",
"WithThreadId"
]
},
"ConnectionStrings": {
"DefaultConnection": "Host=ep-holy-glitter-a4hongg7-pooler.us-east-1.aws.neon.tech;Port=5432;Database=iam_service;Username=neondb_owner;Password=npg_Ssfy6HKO0cXI;SSL Mode=Require"
},
"IdentityServer": {
"Authority": "http://localhost:5001"
},
"Redis": {
"ConnectionString": "localhost:6379"
"Host": "167.114.174.113",
"Port": 6379,
"Password": "Velik@2026",
"Database": 0,
"ConnectTimeout": 5000,
"SyncTimeout": 5000
},
"Jwt": {
"Secret": "goodgo-iam-service-secret-key-32chars!",
@@ -18,5 +49,31 @@
"Audience": "goodgo-services",
"AccessTokenExpiryMinutes": 15,
"RefreshTokenExpiryDays": 7
}
},
"Email": {
"SmtpServer": "smtp.mailgun.org",
"SmtpPort": 587,
"SmtpLogin": "admin@mail.goodgo.us",
"SmtpPassword": "a469e9333580ef5dbb141f01e33864ef-51afd2db-6c014754",
"SenderEmail": "verify@mail.goodgo.us",
"SenderName": "GoodGo IAM Service",
"BaseUrl": "http://localhost:5001"
},
"TwoFactor": {
"Issuer": "IAM Service",
"CodeLength": 6,
"ValidityPeriodSeconds": 30
},
"SocialLogin": {
"Google": {
"ClientId": "",
"ClientSecret": ""
},
"Facebook": {
"AppId": "",
"AppSecret": ""
},
"CallbackUrl": "/api/auth/external-callback"
},
"AllowedHosts": "*"
}

View File

@@ -30,7 +30,7 @@
]
},
"ConnectionStrings": {
"DefaultConnection": "Host=localhost;Port=5432;Database=iamservice_db;Username=postgres;Password=postgres"
"DefaultConnection": "Host=ep-holy-glitter-a4hongg7-pooler.us-east-1.aws.neon.tech;Port=5432;Database=iam_service;Username=neondb_owner;Password=npg_Ssfy6HKO0cXI;SSL Mode=Require"
},
"Redis": {
"Host": "167.114.174.113",