diff --git a/app/config/console.php b/app/config/console.php index ae6c15fd64..6f44368060 100644 --- a/app/config/console.php +++ b/app/config/console.php @@ -73,7 +73,7 @@ $console = [ "signature" => "{{project}} team", ], 'email.otpSession-en' => [ - 'subject' => 'OTP for {{project}} account login', + 'subject' => 'OTP for {{project}} Login', 'preview' => 'Use OTP {{otp}} to sign in to {{project}}. Expires in 15 minutes.', 'heading' => 'Login with OTP to use Appwrite Cloud', 'hello' => 'Hello {{user}},', diff --git a/app/config/locale/templates/email-auth-styled.tpl b/app/config/locale/templates/email-auth-styled.tpl index 544e58b7d8..a826c62e95 100644 --- a/app/config/locale/templates/email-auth-styled.tpl +++ b/app/config/locale/templates/email-auth-styled.tpl @@ -144,6 +144,7 @@ Appwrite logo diff --git a/tests/e2e/Services/Account/AccountBase.php b/tests/e2e/Services/Account/AccountBase.php index 8813e2784f..6cf997e22c 100644 --- a/tests/e2e/Services/Account/AccountBase.php +++ b/tests/e2e/Services/Account/AccountBase.php @@ -152,6 +152,8 @@ trait AccountBase public function testEmailOTPSession(): void { + $isConsoleProject = $this->getProject()['$id'] === 'console'; + $response = $this->client->call(Client::METHOD_POST, '/account/tokens/email', array_merge([ 'origin' => 'http://localhost', 'content-type' => 'application/json', @@ -183,6 +185,16 @@ trait AccountBase $this->assertNotEmpty($code); $this->assertStringContainsStringIgnoringCase('Use OTP ' . $code . ' to sign in to '. $this->getProject()['name'] . '. Expires in 15 minutes.', $lastEmail['text']); + // Only Console project has branded logo in email. + if ($isConsoleProject) { + $this->assertStringContainsStringIgnoringCase('Appwrite logo', $lastEmail['html']); + } + + // TODO: Remove this once OTP login is supported for Console. + if ($isConsoleProject) { + return; + } + $response = $this->client->call(Client::METHOD_POST, '/account/sessions/token', array_merge([ 'origin' => 'http://localhost', 'content-type' => 'application/json',