Skip to content

Commit

Permalink
feat: add secure password change config (#2643)
Browse files Browse the repository at this point in the history
  • Loading branch information
silentworks authored Aug 30, 2024
1 parent 8fa065f commit 89bc764
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions internal/start/start.go
Original file line number Diff line number Diff line change
Expand Up @@ -512,6 +512,7 @@ EOF
fmt.Sprintf("GOTRUE_SECURITY_REFRESH_TOKEN_ROTATION_ENABLED=%v", utils.Config.Auth.EnableRefreshTokenRotation),
fmt.Sprintf("GOTRUE_SECURITY_REFRESH_TOKEN_REUSE_INTERVAL=%v", utils.Config.Auth.RefreshTokenReuseInterval),
fmt.Sprintf("GOTRUE_SECURITY_MANUAL_LINKING_ENABLED=%v", utils.Config.Auth.EnableManualLinking),
fmt.Sprintf("GOTRUE_SECURITY_UPDATE_PASSWORD_REQUIRE_REAUTHENTICATION=%v", utils.Config.Auth.Email.SecurePasswordChange),
fmt.Sprintf("GOTRUE_MFA_PHONE_ENROLL_ENABLED=%v", utils.Config.Auth.MFA.Phone.EnrollEnabled),
fmt.Sprintf("GOTRUE_MFA_PHONE_VERIFY_ENABLED=%v", utils.Config.Auth.MFA.Phone.VerifyEnabled),
fmt.Sprintf("GOTRUE_MFA_TOTP_ENROLL_ENABLED=%v", utils.Config.Auth.MFA.TOTP.EnrollEnabled),
Expand Down
1 change: 1 addition & 0 deletions pkg/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -290,6 +290,7 @@ type (
EnableSignup bool `toml:"enable_signup"`
DoubleConfirmChanges bool `toml:"double_confirm_changes"`
EnableConfirmations bool `toml:"enable_confirmations"`
SecurePasswordChange bool `toml:"secure_password_change"`
Template map[string]emailTemplate `toml:"template"`
Smtp smtp `toml:"smtp"`
MaxFrequency time.Duration `toml:"max_frequency"`
Expand Down
2 changes: 2 additions & 0 deletions pkg/config/templates/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,8 @@ enable_signup = true
double_confirm_changes = true
# If enabled, users need to confirm their email address before signing in.
enable_confirmations = false
# If enabled, users will need to reauthenticate or have logged in recently to change their password.
secure_password_change = false
# Controls the minimum amount of time that must pass before sending another signup confirmation or password reset email.
max_frequency = "1s"

Expand Down

0 comments on commit 89bc764

Please sign in to comment.