25 lines
900 B
Go
25 lines
900 B
Go
package config
|
|
|
|
// OAuthConfig holds configuration for OAuth providers
|
|
type OAuthConfig struct {
|
|
Google OAuthProviderConfig `mapstructure:"google"`
|
|
GitHub OAuthProviderConfig `mapstructure:"github"`
|
|
LinkedIn OAuthProviderConfig `mapstructure:"linkedin"`
|
|
Mock OAuthMockConfig `mapstructure:"mock"`
|
|
}
|
|
|
|
// OAuthMockConfig holds configuration for the mock OAuth server (local dev only)
|
|
type OAuthMockConfig struct {
|
|
Enabled bool `mapstructure:"enabled"`
|
|
BaseURL string `mapstructure:"base_url"` // e.g. http://localhost:9999
|
|
OAuthProviderConfig
|
|
}
|
|
|
|
// OAuthProviderConfig holds configuration for a single OAuth provider
|
|
type OAuthProviderConfig struct {
|
|
ClientID string `mapstructure:"client_id"`
|
|
ClientSecret string `mapstructure:"client_secret"` // Ov23liSo5eCfXJ11k7mr
|
|
RedirectURL string `mapstructure:"redirect_url"`
|
|
Scopes []string `mapstructure:"scopes"`
|
|
}
|