feat: Cấu hình các hằng số client OAuth2 và định tuyến Traefik cho các endpoint OIDC của IdentityServer.

This commit is contained in:
Ho Ngoc Hai
2026-01-16 11:07:16 +07:00
parent e734a21a5b
commit 462e1d0861
5 changed files with 40 additions and 12 deletions

View File

@@ -26,9 +26,17 @@ enum APIConfig {
/// OAuth2 token endpoint (không có version prefix)
static let tokenEndpoint = "/connect/token"
/// OAuth2 client ID for password grant
/// OAuth2 client ID cho password grant
static let oauthClientId = "password-client"
/// OAuth2 client secret for password grant
/// OAuth2 client secret cho password grant
static let oauthClientSecret = "password-client-secret"
/// OAuth2 scope for authentication
/// OAuth2 scope cho xác thc
static let oauthScope = "openid profile email offline_access"
static let oauthScope = "openid profile email api offline_access"
/// Request timeout in seconds
/// Thi gian timeout request (giây)

View File

@@ -121,6 +121,8 @@ final class AuthManager: ObservableObject {
// OAuth2 Password Grant
let formData: [String: String] = [
"grant_type": "password",
"client_id": APIConfig.oauthClientId,
"client_secret": APIConfig.oauthClientSecret,
"username": email,
"password": password,
"scope": APIConfig.oauthScope