Skip to content
Open
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
6 changes: 6 additions & 0 deletions email/email.go
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,8 @@ func sendVerificationEmail(
}
log.Printf("sending verification email to %s for key %s",
emailAddress, publicKey.Fingerprint().Hex())

log.Printf("local verification link: %s", makeDevVerificationUrl(*verifySecretUUID))
return nil
}

Expand Down Expand Up @@ -171,6 +173,10 @@ func makeVerificationUrl(secretUUID uuid.UUID) string {
return fmt.Sprintf("https://api.fluidkeys.com/v1/email/verify/%s", secretUUID.String())
}

func makeDevVerificationUrl(secretUUID uuid.UUID) string {
return fmt.Sprintf("http://localhost:4747/v1/email/verify/%s", secretUUID.String())

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

even neater would be to generate this from the host / port in the request, rather than hard code it!

}

func sendEmail(
userProfileUUID uuid.UUID,
template emailTemplateInterface,
Expand Down