From 2b3d19c5562e238acc9c76a852f5839a880138a4 Mon Sep 17 00:00:00 2001 From: isaac Date: Tue, 4 Jun 2024 13:39:45 -0700 Subject: [PATCH 1/4] Update otp email --- .../src/notifications/emails/otp.js | 1128 +++++++++++------ packages/identity-service/src/utils/otp.js | 3 +- 2 files changed, 772 insertions(+), 359 deletions(-) diff --git a/packages/identity-service/src/notifications/emails/otp.js b/packages/identity-service/src/notifications/emails/otp.js index dc773db44e8..fe93d0744cd 100644 --- a/packages/identity-service/src/notifications/emails/otp.js +++ b/packages/identity-service/src/notifications/emails/otp.js @@ -1,362 +1,776 @@ -const getOtpEmail = ({ title, otp, expire, copyrightYear }) => { - return ` - - - - - - - - - - - - - - - -
- - + +
-
- -
- -
- -
+const getOtpEmail = ({ otp, expire, copyrightYear }) => { + return ` + + + + + + + + + Account Verification OTP Code + + + + + + + + + + + + + +
+ + + + + +
+ + + + + +
+
+
+ ` } diff --git a/packages/identity-service/src/utils/otp.js b/packages/identity-service/src/utils/otp.js index 7a5365d4597..b488da5c902 100644 --- a/packages/identity-service/src/utils/otp.js +++ b/packages/identity-service/src/utils/otp.js @@ -24,11 +24,10 @@ const generateOtp = () => { } const getEmail = ({ otp }) => { - const title = 'Your Audius Verification Code is:' const expire = 'This code will expire in 10 minutes.' const copyrightYear = new Date().getFullYear().toString() const formattedOtp = `${otp.substring(0, 3)} ${otp.substring(3, 6)}` - return getOtpEmail({ title, otp: formattedOtp, expire, copyrightYear }) + return getOtpEmail({ otp: formattedOtp, expire, copyrightYear }) } const validateOtp = async ({ email, otp, redis }) => { From e13481581d5932cb01ba26150a65b3d5cd844335 Mon Sep 17 00:00:00 2001 From: isaac Date: Wed, 5 Jun 2024 15:01:24 -0700 Subject: [PATCH 2/4] lint --- .../identity-service/src/notifications/emails/otp.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/packages/identity-service/src/notifications/emails/otp.js b/packages/identity-service/src/notifications/emails/otp.js index fe93d0744cd..432dc1e81a6 100644 --- a/packages/identity-service/src/notifications/emails/otp.js +++ b/packages/identity-service/src/notifications/emails/otp.js @@ -436,7 +436,7 @@ const getOtpEmail = ({ otp, expire, copyrightYear }) => { -   + @@ -504,9 +504,9 @@ const getOtpEmail = ({ otp, expire, copyrightYear }) => { -   -   -   + + + @@ -630,7 +630,7 @@ const getOtpEmail = ({ otp, expire, copyrightYear }) => {
-   + @@ -666,7 +666,7 @@ const getOtpEmail = ({ otp, expire, copyrightYear }) => {
-   + From 7211e6a8bb1d502073ea588eb24b05036d902b1c Mon Sep 17 00:00:00 2001 From: isaac Date: Thu, 6 Jun 2024 11:39:42 -0700 Subject: [PATCH 3/4] new otp design --- .../src/notifications/emails/otp.js | 175 +++++++++++------- packages/identity-service/src/utils/otp.js | 3 +- 2 files changed, 110 insertions(+), 68 deletions(-) diff --git a/packages/identity-service/src/notifications/emails/otp.js b/packages/identity-service/src/notifications/emails/otp.js index 432dc1e81a6..ac95f04a96f 100644 --- a/packages/identity-service/src/notifications/emails/otp.js +++ b/packages/identity-service/src/notifications/emails/otp.js @@ -1,5 +1,6 @@ -const getOtpEmail = ({ otp, expire, copyrightYear }) => { - return ` +const getOtpEmail = ({ otp, copyrightYear }) => { + return ` + @@ -8,7 +9,7 @@ const getOtpEmail = ({ otp, expire, copyrightYear }) => { - Account Verification OTP Code + Your Audius Verification Code
@@ -165,7 +166,7 @@ const getOtpEmail = ({ otp, expire, copyrightYear }) => {
-
+ @@ -174,7 +175,7 @@ const getOtpEmail = ({ otp, expire, copyrightYear }) => {
-
@@ -208,28 +209,28 @@ const getOtpEmail = ({ otp, expire, copyrightYear }) => {
-
+ -
+ - -
+ - -
-
Your Verification Code
+
+
Your Verification Code
-
Your one-time verification code is:
+
+
Your Audius Verification code is:
@@ -242,13 +243,13 @@ const getOtpEmail = ({ otp, expire, copyrightYear }) => {
+ -
+ - @@ -291,8 +298,17 @@ const getOtpEmail = ({ otp, expire, copyrightYear }) => {
+ @@ -274,12 +275,18 @@ const getOtpEmail = ({ otp, expire, copyrightYear }) => { - - +
-
${expire}
+
+ + + + +
+
This code will expire in 10 minutes.
+
-
- +
+ + + + + + + +
+ + + + +
+ @@ -303,6 +319,15 @@ const getOtpEmail = ({ otp, expire, copyrightYear }) => { + + +
+
+
@@ -315,34 +340,31 @@ const getOtpEmail = ({ otp, expire, copyrightYear }) => {
-
+ - - +
+ - - + @@ -390,10 +431,10 @@ const getOtpEmail = ({ otp, expire, copyrightYear }) => { -
- - -
- +
- + +
+ - + - + - + +
-
Audius Support
-
-
Questions? Audius Support can help!
+
+
@@ -352,8 +374,22 @@ const getOtpEmail = ({ otp, expire, copyrightYear }) => {
+ + + + + +
+ + + + + + + +
+
Audius Support
+
-
Visit Audius Support
+
Questions? Audius Support can help!
@@ -365,6 +401,11 @@ const getOtpEmail = ({ otp, expire, copyrightYear }) => {
+
Visit Audius Support
+
+