Skip to content
This repository was archived by the owner on Jun 11, 2025. It is now read-only.
Merged
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
25 changes: 4 additions & 21 deletions apps/auth/internal/domain/impl.go
Original file line number Diff line number Diff line change
Expand Up @@ -211,20 +211,11 @@ func (d *domainI) SignUp(ctx context.Context, name string, email string, passwor
return nil, errors.NewE(err)
}

if _, err := d.commsClient.SendWaitingEmail(
ctx, &comms.WelcomeEmailInput{
Email: user.Email,
Name: user.Name,
},
); err != nil {
d.logger.Errorf(err)
err = d.generateAndSendVerificationToken(ctx, user)
if err != nil {
return nil, errors.NewE(err)
}

//err = d.generateAndSendVerificationToken(ctx, user)
//if err != nil {
// return nil, errors.NewE(err)
//}

return newAuthSession(user.Id, user.Email, user.Name, user.Verified, "email/password"), nil
}

Expand Down Expand Up @@ -278,15 +269,7 @@ func (d *domainI) VerifyEmail(ctx context.Context, token string) (*common.AuthSe
if err != nil {
return nil, errors.NewE(err)
}
//if _, err := d.commsClient.SendWelcomeEmail(
// ctx, &comms.WelcomeEmailInput{
// Email: user.Email,
// Name: user.Name,
// },
//); err != nil {
// d.logger.Errorf(err)
//}
if _, err := d.commsClient.SendWaitingEmail(
if _, err := d.commsClient.SendWelcomeEmail(
ctx, &comms.WelcomeEmailInput{
Email: user.Email,
Name: user.Name,
Expand Down