Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion internal/api/magic_link.go
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ func (a *API) MagicLink(w http.ResponseWriter, r *http.Request) error {
if isNewUser {
// User either doesn't exist or hasn't completed the signup process.
// Sign them up with temporary password.
password := crypto.GeneratePassword(config.Password.RequiredCharacters, 33)
password := crypto.GeneratePassword(config.Password.RequiredCharacters, max(config.Password.MinLength, 33))

signUpParams := &SignupParams{
Email: params.Email,
Expand Down
2 changes: 1 addition & 1 deletion internal/api/otp.go
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ func (a *API) SmsOtp(w http.ResponseWriter, r *http.Request) error {
if isNewUser {
// User either doesn't exist or hasn't completed the signup process.
// Sign them up with temporary password.
password, err := password.Generate(64, 10, 1, false, true)
password, err := password.Generate(max(config.Password.MinLength, 64), 10, 1, false, true)
if err != nil {
return apierrors.NewInternalServerError("error creating user").WithInternalError(err)
}
Expand Down