-
Notifications
You must be signed in to change notification settings - Fork 82
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Local kratos email verification with mailslurper #1648
Merged
Merged
Changes from 8 commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
78593bf
Add email flow
thehabbos007 61fe1a5
Enable email sending in dev mode to mailslurper
thehabbos007 bb07373
Disable prod email sending
thehabbos007 539846e
Make kratos error a debug
thehabbos007 9ecc234
Merge branch 'main' into asa/kratos-mail-sending
thehabbos007 460834c
Merge branch 'main' into asa/kratos-mail-sending
benwerner01 38b3db1
add comment for smtp uri
thehabbos007 e98a86b
Update packages/hash/external-services/kratos/templates/recovery_codeβ¦
thehabbos007 75e8521
Update packages/hash/frontend/src/pages/verification.page.tsx
thehabbos007 f710e62
Email template update to `HASH account`
thehabbos007 8ff88d9
Email index in readme
thehabbos007 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
packages/hash/external-services/kratos/templates/otp/sms.body.gotmpl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Your verification code is: {{ .Code }} |
9 changes: 9 additions & 0 deletions
9
packages/hash/external-services/kratos/templates/recovery/invalid/email.body.gotmpl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
Hi, | ||
|
||
you (or someone else) entered this email address when trying to recover access to an account. | ||
|
||
However, this email address is not on our database of registered users and therefore the attempt has failed. | ||
|
||
If this was you, check if you signed up using a different address. | ||
|
||
If this was not you, please ignore this email. |
9 changes: 9 additions & 0 deletions
9
...ages/hash/external-services/kratos/templates/recovery/invalid/email.body.plaintext.gotmpl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
Hi, | ||
|
||
you (or someone else) entered this email address when trying to recover access to an account. | ||
|
||
However, this email address is not on our database of registered users and therefore the attempt has failed. | ||
|
||
If this was you, check if you signed up using a different address. | ||
|
||
If this was not you, please ignore this email. |
1 change: 1 addition & 0 deletions
1
packages/hash/external-services/kratos/templates/recovery/invalid/email.subject.gotmpl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Account access attempted |
5 changes: 5 additions & 0 deletions
5
packages/hash/external-services/kratos/templates/recovery/valid/email.body.gotmpl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
Hi, | ||
|
||
please recover access to your account by clicking the following link: | ||
|
||
<a href="{{ .RecoveryURL }}">{{ .RecoveryURL }}</a> |
5 changes: 5 additions & 0 deletions
5
packages/hash/external-services/kratos/templates/recovery/valid/email.body.plaintext.gotmpl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
Hi, | ||
|
||
please recover access to your account by clicking the following link: | ||
|
||
{{ .RecoveryURL }} |
1 change: 1 addition & 0 deletions
1
packages/hash/external-services/kratos/templates/recovery/valid/email.subject.gotmpl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Recover access to your account |
9 changes: 9 additions & 0 deletions
9
packages/hash/external-services/kratos/templates/recovery_code/invalid/email.body.gotmpl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
Hi, | ||
|
||
you (or someone else) entered this email address when trying to recover access to an account. | ||
|
||
However, this email address is not on our database of registered users and therefore the attempt has failed. | ||
|
||
If this was you, check if you signed up using a different address. | ||
|
||
If this was not you, please ignore this email. |
9 changes: 9 additions & 0 deletions
9
...hash/external-services/kratos/templates/recovery_code/invalid/email.body.plaintext.gotmpl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
Hi, | ||
|
||
you (or someone else) entered this email address when trying to recover access to a HASH account. | ||
|
||
However, this email address is not on our database of registered users and therefore the attempt has failed. | ||
|
||
If this was you, check if you signed up using a different address. | ||
|
||
If this was not you, please ignore this email. |
1 change: 1 addition & 0 deletions
1
packages/hash/external-services/kratos/templates/recovery_code/invalid/email.subject.gotmpl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Account access attempted |
5 changes: 5 additions & 0 deletions
5
packages/hash/external-services/kratos/templates/recovery_code/valid/email.body.gotmpl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
Hi, | ||
|
||
please recover access to your account by entering the following code: | ||
|
||
{{ .RecoveryCode }} |
5 changes: 5 additions & 0 deletions
5
...s/hash/external-services/kratos/templates/recovery_code/valid/email.body.plaintext.gotmpl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
Hi, | ||
|
||
please recover access to your account by entering the following code: | ||
|
||
{{ .RecoveryCode }} |
1 change: 1 addition & 0 deletions
1
packages/hash/external-services/kratos/templates/recovery_code/valid/email.subject.gotmpl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Recover access to your account |
7 changes: 7 additions & 0 deletions
7
packages/hash/external-services/kratos/templates/verification_code/invalid/email.body.gotmpl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
Hi, | ||
|
||
someone asked to verify this email address, but we were unable to find an account for this address. | ||
|
||
If this was you, check if you signed up using a different address. | ||
|
||
If this was not you, please ignore this email. |
7 changes: 7 additions & 0 deletions
7
.../external-services/kratos/templates/verification_code/invalid/email.body.plaintext.gotmpl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
Hi, | ||
|
||
someone asked to verify this email address, but we were unable to find an account for this address. | ||
|
||
If this was you, check if you signed up using a different address. | ||
|
||
If this was not you, please ignore this email. |
1 change: 1 addition & 0 deletions
1
...es/hash/external-services/kratos/templates/verification_code/invalid/email.subject.gotmpl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Someone tried to verify this email address |
8 changes: 8 additions & 0 deletions
8
packages/hash/external-services/kratos/templates/verification_code/valid/email.body.gotmpl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
Hi, | ||
|
||
please verify your account by entering the following code:<br /> | ||
{{ .VerificationCode }}<br /> | ||
or clicking the following link:<br /> | ||
<a href="{{ .VerificationURL }}" target="_blank">{{ .VerificationURL }}</a><br /> | ||
|
||
The link is valid for 48 hours. |
9 changes: 9 additions & 0 deletions
9
...sh/external-services/kratos/templates/verification_code/valid/email.body.plaintext.gotmpl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
Hi, | ||
|
||
please verify your account by entering the following code: | ||
|
||
{{ .VerificationCode }} | ||
|
||
or clicking the following link: | ||
|
||
{{ .VerificationURL }} |
1 change: 1 addition & 0 deletions
1
...ages/hash/external-services/kratos/templates/verification_code/valid/email.subject.gotmpl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Please verify your email address |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice, should we make an effort from here on to start copying in the documentation from the ory kratos website?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it's very helpful for values that we know we will inject new values into such as this and the
UI_URL
s. Fortunately their env naming matches the path of theyaml
but in upper case and with underscores. I think it's helpful to have the env var to be easily-copied, though