mirror of https://github.com/muety/wakapi.git
feat(oauth): add config for oauth
This commit is contained in:
parent
bc2d05bd85
commit
0f415e2f9d
|
@ -74,6 +74,12 @@ subscriptions:
|
||||||
stripe_endpoint_secret:
|
stripe_endpoint_secret:
|
||||||
standard_price_id:
|
standard_price_id:
|
||||||
|
|
||||||
|
oauth:
|
||||||
|
enabled: false # whether to enable oauth
|
||||||
|
provider: # one of ['github', 'microsoft', 'google']
|
||||||
|
client_id: # oauth client id
|
||||||
|
client_secret: # oauth client secret
|
||||||
|
|
||||||
mail:
|
mail:
|
||||||
enabled: true # whether to enable mails (used for password resets, reports, etc.)
|
enabled: true # whether to enable mails (used for password resets, reports, etc.)
|
||||||
provider: smtp # method for sending mails, currently one of ['smtp', 'mailwhale']
|
provider: smtp # method for sending mails, currently one of ['smtp', 'mailwhale']
|
||||||
|
|
|
@ -144,6 +144,13 @@ type sentryConfig struct {
|
||||||
SampleRateHeartbeats float32 `yaml:"sample_rate_heartbeats" default:"0.1" env:"WAKAPI_SENTRY_SAMPLE_RATE_HEARTBEATS"`
|
SampleRateHeartbeats float32 `yaml:"sample_rate_heartbeats" default:"0.1" env:"WAKAPI_SENTRY_SAMPLE_RATE_HEARTBEATS"`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
type oauthConfig struct {
|
||||||
|
Enabled bool `env:"WAKAPI_OAUTH_ENABLED" default:"false"`
|
||||||
|
Provider string `env:"WAKAPI_OAUTH_PROVIDER" default:"github"`
|
||||||
|
ClientId string `yaml:"client_id" env:"WAKAPI_OAUTH_CLIENT_ID"`
|
||||||
|
ClientSecret string `yaml:"client_secret" env:"WAKAPI_OAUTH_CLIENT_SECRET"`
|
||||||
|
}
|
||||||
|
|
||||||
type mailConfig struct {
|
type mailConfig struct {
|
||||||
Enabled bool `env:"WAKAPI_MAIL_ENABLED" default:"true"`
|
Enabled bool `env:"WAKAPI_MAIL_ENABLED" default:"true"`
|
||||||
Provider string `env:"WAKAPI_MAIL_PROVIDER" default:"smtp"`
|
Provider string `env:"WAKAPI_MAIL_PROVIDER" default:"smtp"`
|
||||||
|
@ -178,6 +185,7 @@ type Config struct {
|
||||||
Server serverConfig
|
Server serverConfig
|
||||||
Subscriptions subscriptionsConfig
|
Subscriptions subscriptionsConfig
|
||||||
Sentry sentryConfig
|
Sentry sentryConfig
|
||||||
|
OAuth oauthConfig
|
||||||
Mail mailConfig
|
Mail mailConfig
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue