Skip to content
This repository was archived by the owner on Jun 11, 2025. It is now read-only.
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
21 changes: 13 additions & 8 deletions apps/accounts/internal/app/graph/account.resolvers.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

117 changes: 26 additions & 91 deletions apps/accounts/internal/app/graph/generated/generated.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

21 changes: 13 additions & 8 deletions apps/accounts/internal/app/graph/invitation.resolvers.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ type Account @shareable {
createdBy: Github__com___kloudlite___api___common__CreatedOrUpdatedBy!
creationTime: Date!
displayName: String!
id: String!
id: ID!
isActive: Boolean
lastUpdatedBy: Github__com___kloudlite___api___common__CreatedOrUpdatedBy!
logo: String
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ type Invitation @shareable {
accepted: Boolean
accountName: String!
creationTime: Date!
id: String!
id: ID!
invitedBy: String!
inviteToken: String!
markedForDeletion: Boolean
Expand Down
36 changes: 30 additions & 6 deletions apps/auth/internal/domain/impl.go
Original file line number Diff line number Diff line change
Expand Up @@ -206,11 +206,20 @@ func (d *domainI) SignUp(ctx context.Context, name string, email string, passwor
return nil, errors.NewE(err)
}

err = d.generateAndSendVerificationToken(ctx, user)
if err != nil {
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)
//}

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

Expand Down Expand Up @@ -264,7 +273,15 @@ func (d *domainI) VerifyEmail(ctx context.Context, token string) (*common.AuthSe
if err != nil {
return nil, errors.NewE(err)
}
if _, err := d.commsClient.SendWelcomeEmail(
//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(
ctx, &comms.WelcomeEmailInput{
Email: user.Email,
Name: user.Name,
Expand Down Expand Up @@ -404,7 +421,15 @@ func (d *domainI) addOAuthLogin(ctx context.Context, provider string, token *oau
user = u
user.Joined = time.Now()
user, err = d.userRepo.Create(ctx, user)
if _, err := d.commsClient.SendWelcomeEmail(
//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(
ctx, &comms.WelcomeEmailInput{
Email: user.Email,
Name: user.Name,
Expand Down Expand Up @@ -598,7 +623,6 @@ func (d *domainI) GetAccessToken(ctx context.Context, provider string, userId st
if err != nil {
return nil, errors.NewEf(err, "could not update access token")
}
// fmt.Println("accToken: ", accToken)
return accToken, nil
}

Expand Down
4 changes: 0 additions & 4 deletions apps/comms/Taskfile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,6 @@ vars:
tasks:
run:
dotenv: [".secrets/env"]
env:
EMAIL_LINKS_BASE_URL: "https://auth.local.kl.madhouselabs.io"
GRPC_PORT: 50051
SUPPORT_EMAIL: support@kloudlite.io
cmds:
- nodemon -e go --signal SIGKILL --exec 'go run -tags dynamic main.go --dev || exit 1'

Expand Down
Loading