-
-
Notifications
You must be signed in to change notification settings - Fork 3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(core): support one time password (#9798)
- Loading branch information
Showing
16 changed files
with
362 additions
and
131 deletions.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -932,7 +932,7 @@ Generated by [AVA](https://avajs.dev). | |
<p␊ | ||
style="font-size:20px;line-height:28px;margin:24px 0 0;font-weight:600;font-family:Inter, Arial, Helvetica, sans-serif;color:#141414"␊ | ||
>␊ | ||
Sign in to AFFiNE␊ | ||
Sign in to AFFiNE Cloud␊ | ||
</p>␊ | ||
</td>␊ | ||
</tr>␊ | ||
|
@@ -962,8 +962,44 @@ Generated by [AVA](https://avajs.dev). | |
<p␊ | ||
style="font-size:15px;line-height:24px;margin:24px 0 0;font-weight:400;font-family:Inter, Arial, Helvetica, sans-serif;color:#141414"␊ | ||
>␊ | ||
Click the button below to securely sign in. The magic link will␊ | ||
expire in 30 minutes.␊ | ||
You are signing in to AFFiNE. Here is your code:␊ | ||
</p>␊ | ||
</tr>␊ | ||
</tbody>␊ | ||
</table>␊ | ||
<table␊ | ||
align="center"␊ | ||
width="100%"␊ | ||
border="0"␊ | ||
cellpadding="0"␊ | ||
cellspacing="0"␊ | ||
role="presentation"␊ | ||
>␊ | ||
<tbody style="width:100%">␊ | ||
<tr style="width:100%">␊ | ||
<pre␊ | ||
style="font-size:15px;font-weight:400;line-height:24px;font-family:Inter, Arial, Helvetica, sans-serif;margin:24px 0 0;color:#141414;white-space:nowrap;border:1px solid rgba(0,0,0,.1);padding:8px 10px;border-radius:4px;background-color:#F5F5F5"␊ | ||
>␊ | ||
123456</pre␊ | ||
>␊ | ||
</tr>␊ | ||
</tbody>␊ | ||
</table>␊ | ||
<table␊ | ||
align="center"␊ | ||
width="100%"␊ | ||
border="0"␊ | ||
cellpadding="0"␊ | ||
cellspacing="0"␊ | ||
role="presentation"␊ | ||
>␊ | ||
<tbody style="width:100%">␊ | ||
<tr style="width:100%">␊ | ||
<p␊ | ||
style="font-size:15px;line-height:24px;margin:24px 0 0;font-weight:400;font-family:Inter, Arial, Helvetica, sans-serif;color:#141414"␊ | ||
>␊ | ||
Alternatively, you can sign in directly by clicking the magic␊ | ||
link below:␊ | ||
</p>␊ | ||
</tr>␊ | ||
</tbody>␊ | ||
|
@@ -979,6 +1015,7 @@ Generated by [AVA](https://avajs.dev). | |
<tbody style="width:100%">␊ | ||
<tr style="width:100%">␊ | ||
<a␊ | ||
href="https://app.affine.pro/magic-link?token=123456&[email protected]"␊ | ||
style="line-height:24px;text-decoration:none;display:inline-block;max-width:100%;mso-padding-alt:0px;font-size:15px;font-weight:600;font-family:Inter, Arial, Helvetica, sans-serif;margin:24px 0 0;color:#FFFFFF;background-color:#1E96EB;padding:8px 18px 8px 18px;border-radius:8px;border:1px solid rgba(0,0,0,.1);margin-right:4px"␊ | ||
target="_blank"␊ | ||
><span␊ | ||
|
@@ -989,7 +1026,7 @@ Generated by [AVA](https://avajs.dev). | |
[endif]--></span␊ | ||
><span␊ | ||
style="max-width:100%;display:inline-block;line-height:120%;mso-padding-alt:0px;mso-text-raise:6px"␊ | ||
>Sign in to AFFiNE</span␊ | ||
>Sign in with Magic Link</span␊ | ||
><span␊ | ||
><!--[if mso␊ | ||
]><i style="mso-font-width:450%" hidden␊ | ||
|
@@ -1001,6 +1038,27 @@ Generated by [AVA](https://avajs.dev). | |
</tr>␊ | ||
</tbody>␊ | ||
</table>␊ | ||
<table␊ | ||
align="center"␊ | ||
width="100%"␊ | ||
border="0"␊ | ||
cellpadding="0"␊ | ||
cellspacing="0"␊ | ||
role="presentation"␊ | ||
>␊ | ||
<tbody style="width:100%">␊ | ||
<tr style="width:100%">␊ | ||
<p␊ | ||
style="font-size:15px;line-height:24px;margin:24px 0 0;font-weight:400;font-family:Inter, Arial, Helvetica, sans-serif;color:#141414"␊ | ||
>␊ | ||
<span␊ | ||
style="font-size:14px;font-weight:400;line-height:22px;font-family:Inter, Arial, Helvetica, sans-serif;margin:24px 0 0;color:#7A7A7A"␊ | ||
>This code and link will expire in 30 minutes.</span␊ | ||
>␊ | ||
</p>␊ | ||
</tr>␊ | ||
</tbody>␊ | ||
</table>␊ | ||
</td>␊ | ||
</tr>␊ | ||
</tbody>␊ | ||
|
@@ -1026,7 +1084,7 @@ Generated by [AVA](https://avajs.dev). | |
<p␊ | ||
style="font-size:20px;line-height:28px;margin:24px 0 0;font-weight:600;font-family:Inter, Arial, Helvetica, sans-serif;color:#141414"␊ | ||
>␊ | ||
Create AFFiNE Account␊ | ||
Sign up to AFFiNE Cloud␊ | ||
</p>␊ | ||
</td>␊ | ||
</tr>␊ | ||
|
@@ -1056,9 +1114,44 @@ Generated by [AVA](https://avajs.dev). | |
<p␊ | ||
style="font-size:15px;line-height:24px;margin:24px 0 0;font-weight:400;font-family:Inter, Arial, Helvetica, sans-serif;color:#141414"␊ | ||
>␊ | ||
Click the button below to complete your account creation and␊ | ||
sign in. This magic link will expire in␊ | ||
<span style="font-weight:600">30 minutes</span>.␊ | ||
You are signing up to AFFiNE. Here is your code:␊ | ||
</p>␊ | ||
</tr>␊ | ||
</tbody>␊ | ||
</table>␊ | ||
<table␊ | ||
align="center"␊ | ||
width="100%"␊ | ||
border="0"␊ | ||
cellpadding="0"␊ | ||
cellspacing="0"␊ | ||
role="presentation"␊ | ||
>␊ | ||
<tbody style="width:100%">␊ | ||
<tr style="width:100%">␊ | ||
<pre␊ | ||
style="font-size:15px;font-weight:400;line-height:24px;font-family:Inter, Arial, Helvetica, sans-serif;margin:24px 0 0;color:#141414;white-space:nowrap;border:1px solid rgba(0,0,0,.1);padding:8px 10px;border-radius:4px;background-color:#F5F5F5"␊ | ||
>␊ | ||
123456</pre␊ | ||
>␊ | ||
</tr>␊ | ||
</tbody>␊ | ||
</table>␊ | ||
<table␊ | ||
align="center"␊ | ||
width="100%"␊ | ||
border="0"␊ | ||
cellpadding="0"␊ | ||
cellspacing="0"␊ | ||
role="presentation"␊ | ||
>␊ | ||
<tbody style="width:100%">␊ | ||
<tr style="width:100%">␊ | ||
<p␊ | ||
style="font-size:15px;line-height:24px;margin:24px 0 0;font-weight:400;font-family:Inter, Arial, Helvetica, sans-serif;color:#141414"␊ | ||
>␊ | ||
Alternatively, you can sign up directly by clicking the magic␊ | ||
link below:␊ | ||
</p>␊ | ||
</tr>␊ | ||
</tbody>␊ | ||
|
@@ -1074,7 +1167,7 @@ Generated by [AVA](https://avajs.dev). | |
<tbody style="width:100%">␊ | ||
<tr style="width:100%">␊ | ||
<a␊ | ||
href="https://app.affine.pro"␊ | ||
href="https://app.affine.pro/magic-link?token=123456&[email protected]"␊ | ||
style="line-height:24px;text-decoration:none;display:inline-block;max-width:100%;mso-padding-alt:0px;font-size:15px;font-weight:600;font-family:Inter, Arial, Helvetica, sans-serif;margin:24px 0 0;color:#FFFFFF;background-color:#1E96EB;padding:8px 18px 8px 18px;border-radius:8px;border:1px solid rgba(0,0,0,.1);margin-right:4px"␊ | ||
target="_blank"␊ | ||
><span␊ | ||
|
@@ -1085,7 +1178,7 @@ Generated by [AVA](https://avajs.dev). | |
[endif]--></span␊ | ||
><span␊ | ||
style="max-width:100%;display:inline-block;line-height:120%;mso-padding-alt:0px;mso-text-raise:6px"␊ | ||
>Create account and sign in</span␊ | ||
>Sign up with Magic Link</span␊ | ||
><span␊ | ||
><!--[if mso␊ | ||
]><i style="mso-font-width:450%" hidden␊ | ||
|
@@ -1097,6 +1190,27 @@ Generated by [AVA](https://avajs.dev). | |
</tr>␊ | ||
</tbody>␊ | ||
</table>␊ | ||
<table␊ | ||
align="center"␊ | ||
width="100%"␊ | ||
border="0"␊ | ||
cellpadding="0"␊ | ||
cellspacing="0"␊ | ||
role="presentation"␊ | ||
>␊ | ||
<tbody style="width:100%">␊ | ||
<tr style="width:100%">␊ | ||
<p␊ | ||
style="font-size:15px;line-height:24px;margin:24px 0 0;font-weight:400;font-family:Inter, Arial, Helvetica, sans-serif;color:#141414"␊ | ||
>␊ | ||
<span␊ | ||
style="font-size:14px;font-weight:400;line-height:22px;font-family:Inter, Arial, Helvetica, sans-serif;margin:24px 0 0;color:#7A7A7A"␊ | ||
>This code and link will expire in 30 minutes.</span␊ | ||
>␊ | ||
</p>␊ | ||
</tr>␊ | ||
</tbody>␊ | ||
</table>␊ | ||
</td>␊ | ||
</tr>␊ | ||
</tbody>␊ | ||
|
Binary file modified
BIN
+217 Bytes
(110%)
packages/backend/server/src/__tests__/__snapshots__/mailer.spec.ts.snap
Binary file not shown.
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
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.