Skip to content
Merged
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 apps/server/go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/coderz-space/coderz.space

go 1.24.3
go 1.25.0

require (
github.com/go-playground/validator/v10 v10.30.1
Expand Down
9 changes: 9 additions & 0 deletions apps/server/internal/modules/auth/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,15 @@ import (
"crypto/rand"
"encoding/hex"
"errors"
"fmt"
"time"

"github.com/coderz-space/coderz.space/internal/common/logger"
"github.com/coderz-space/coderz.space/internal/common/utils"
"github.com/coderz-space/coderz.space/internal/config"
db "github.com/coderz-space/coderz.space/internal/db/sqlc"
"github.com/jackc/pgx/v5/pgtype"
"go.uber.org/zap"
"golang.org/x/crypto/bcrypt"
)

Expand Down Expand Up @@ -191,6 +194,12 @@ func (s *Service) ForgotPassword(ctx context.Context, req ForgotPasswordRequest)
// TODO: Send email with reset token
// For now, we just log it (in production, send via email service)
// Email would contain a link like: https://app.com/reset-password?token={resetToken}
logger.Info("Password reset requested",
zap.String("event", "password_reset_email_mock"),
zap.String("email", user.Email.String),
zap.String("reset_token", resetToken),
zap.String("reset_link", fmt.Sprintf("%s/reset-password?token=%s", s.config.FrontendOrigin, resetToken)),
)

return nil
}
Expand Down
Loading