@@ -162,15 +162,16 @@ type (
162162 SigningKeysPath string `toml:"signing_keys_path"`
163163 SigningKeys []JWK `toml:"-"`
164164
165- RateLimit rateLimit `toml:"rate_limit"`
166- Captcha * captcha `toml:"captcha"`
167- Hook hook `toml:"hook"`
168- MFA mfa `toml:"mfa"`
169- Sessions sessions `toml:"sessions"`
170- Email email `toml:"email"`
171- Sms sms `toml:"sms"`
172- External external `toml:"external"`
173- Web3 web3 `toml:"web3"`
165+ RateLimit rateLimit `toml:"rate_limit"`
166+ Captcha * captcha `toml:"captcha"`
167+ Hook hook `toml:"hook"`
168+ MFA mfa `toml:"mfa"`
169+ Sessions sessions `toml:"sessions"`
170+ Email email `toml:"email"`
171+ Sms sms `toml:"sms"`
172+ External external `toml:"external"`
173+ Web3 web3 `toml:"web3"`
174+ OAuthServer OAuthServer `toml:"oauth_server"`
174175
175176 // Custom secrets can be injected from .env file
176177 PublishableKey Secret `toml:"publishable_key"`
@@ -368,6 +369,12 @@ type (
368369 Solana solana `toml:"solana"`
369370 Ethereum ethereum `toml:"ethereum"`
370371 }
372+
373+ OAuthServer struct {
374+ Enabled bool `toml:"enabled"`
375+ AllowDynamicRegistration bool `toml:"allow_dynamic_registration"`
376+ AuthorizationUrlPath string `toml:"authorization_url_path"`
377+ }
371378)
372379
373380func (a * auth ) ToUpdateAuthConfigBody () v1API.UpdateAuthConfigBody {
@@ -399,6 +406,7 @@ func (a *auth) ToUpdateAuthConfigBody() v1API.UpdateAuthConfigBody {
399406 a .Sms .toAuthConfigBody (& body )
400407 a .External .toAuthConfigBody (& body )
401408 a .Web3 .toAuthConfigBody (& body )
409+ a .OAuthServer .toAuthConfigBody (& body )
402410 return body
403411}
404412
@@ -426,6 +434,7 @@ func (a *auth) FromRemoteAuthConfig(remoteConfig v1API.AuthConfigResponse) {
426434 a .Sms .fromAuthConfig (remoteConfig )
427435 a .External .fromAuthConfig (remoteConfig )
428436 a .Web3 .fromAuthConfig (remoteConfig )
437+ a .OAuthServer .fromAuthConfig (remoteConfig )
429438}
430439
431440func (r rateLimit ) toAuthConfigBody (body * v1API.UpdateAuthConfigBody ) {
@@ -1338,6 +1347,18 @@ func (w *web3) fromAuthConfig(remoteConfig v1API.AuthConfigResponse) {
13381347 }
13391348}
13401349
1350+ func (o OAuthServer ) toAuthConfigBody (body * v1API.UpdateAuthConfigBody ) {
1351+ // TODO(cemal) :: implement me
1352+ // OAuth server configuration is behind a feature flag in the remote API
1353+ // Will be implemented when the feature reaches GA
1354+ }
1355+
1356+ func (o * OAuthServer ) fromAuthConfig (remoteConfig v1API.AuthConfigResponse ) {
1357+ // TODO(cemal) :: implement me
1358+ // OAuth server configuration is behind a feature flag in the remote API
1359+ // Will be implemented when the feature reaches GA
1360+ }
1361+
13411362func (a * auth ) DiffWithRemote (remoteConfig v1API.AuthConfigResponse , filter ... func (string ) bool ) ([]byte , error ) {
13421363 copy := a .Clone ()
13431364 copy .FromRemoteAuthConfig (remoteConfig )
0 commit comments