code formatting
This commit is contained in:
parent
bf14d1d97d
commit
2d204d593a
2 changed files with 6 additions and 6 deletions
|
@ -949,7 +949,7 @@ App::post('/v1/account/sessions/magic-url')
|
||||||
throw new Exception(Exception::GENERAL_SMTP_DISABLED, 'SMTP disabled');
|
throw new Exception(Exception::GENERAL_SMTP_DISABLED, 'SMTP disabled');
|
||||||
}
|
}
|
||||||
|
|
||||||
if($securityPhrase === true) {
|
if ($securityPhrase === true) {
|
||||||
$securityPhrase = SecurityPhrase::generate();
|
$securityPhrase = SecurityPhrase::generate();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1062,7 +1062,7 @@ App::post('/v1/account/sessions/magic-url')
|
||||||
->setParam('{{thanks}}', $locale->getText("emails.magicSession.thanks"))
|
->setParam('{{thanks}}', $locale->getText("emails.magicSession.thanks"))
|
||||||
->setParam('{{signature}}', $locale->getText("emails.magicSession.signature"));
|
->setParam('{{signature}}', $locale->getText("emails.magicSession.signature"));
|
||||||
|
|
||||||
if(!empty($securityPhrase)) {
|
if (!empty($securityPhrase)) {
|
||||||
$message->setParam('{{securityPhrase}}', $locale->getText("emails.magicSession.securityPhrase"));
|
$message->setParam('{{securityPhrase}}', $locale->getText("emails.magicSession.securityPhrase"));
|
||||||
} else {
|
} else {
|
||||||
$message->setParam('{{securityPhrase}}', '');
|
$message->setParam('{{securityPhrase}}', '');
|
||||||
|
@ -1146,7 +1146,7 @@ App::post('/v1/account/sessions/magic-url')
|
||||||
// Hide secret for clients
|
// Hide secret for clients
|
||||||
$token->setAttribute('secret', ($isPrivilegedUser || $isAppUser) ? $loginSecret : '');
|
$token->setAttribute('secret', ($isPrivilegedUser || $isAppUser) ? $loginSecret : '');
|
||||||
|
|
||||||
if(!empty($securityPhrase)) {
|
if (!empty($securityPhrase)) {
|
||||||
$token->setAttribute('securityPhrase', $securityPhrase);
|
$token->setAttribute('securityPhrase', $securityPhrase);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -4,7 +4,7 @@ namespace Appwrite\Auth;
|
||||||
|
|
||||||
class SecurityPhrase
|
class SecurityPhrase
|
||||||
{
|
{
|
||||||
static public function generate(): string
|
public static function generate(): string
|
||||||
{
|
{
|
||||||
$adjectives = ["Abundant", "Adaptable", "Adventurous", "Affectionate", "Agile", "Amiable", "Amazing", "Ambitious", "Amicable", "Amusing", "Astonishing", "Attentive", "Authentic", "Awesome", "Balanced", "Beautiful", "Bold", "Brave", "Bright", "Bubbly", "Calm", "Capable", "Charismatic", "Charming", "Cheerful", "Clever", "Colorful", "Compassionate", "Confident", "Cooperative", "Courageous", "Courteous", "Creative", "Curious", "Dazzling", "Dedicated", "Delightful", "Determined", "Diligent", "Dynamic", "Easygoing", "Effervescent", "Efficient", "Elegant", "Empathetic", "Energetic", "Enthusiastic", "Exuberant", "Faithful", "Fantastic", "Fearless", "Flexible", "Friendly", "Fun-loving", "Generous", "Gentle", "Genuine", "Graceful", "Gracious", "Happy", "Hardworking", "Harmonious", "Helpful", "Honest", "Hopeful", "Humble", "Imaginative", "Impressive", "Incredible", "Inspiring", "Intelligent", "Joyful", "Kind", "Knowledgeable", "Lively", "Lovable", "Lovely", "Loyal", "Majestic", "Magnificent", "Mindful", "Modest", "Passionate", "Patient", "Peaceful", "Perseverant", "Playful", "Polite", "Positive", "Powerful", "Practical", "Precious", "Proactive", "Productive", "Punctual", "Quick-witted", "Radiant", "Reliable", "Resilient", "Resourceful", "Respectful", "Responsible", "Sensitive", "Serene", "Sincere", "Skillful", "Soothing", "Spirited", "Splendid", "Steadfast", "Strong", "Supportive", "Sweet", "Talented", "Thankful", "Thoughtful", "Thriving", "Tranquil", "Trustworthy", "Upbeat", "Versatile", "Vibrant", "Vigilant", "Warmhearted", "Welcoming", "Wholesome", "Witty", "Wonderful", "Zealous"];
|
$adjectives = ["Abundant", "Adaptable", "Adventurous", "Affectionate", "Agile", "Amiable", "Amazing", "Ambitious", "Amicable", "Amusing", "Astonishing", "Attentive", "Authentic", "Awesome", "Balanced", "Beautiful", "Bold", "Brave", "Bright", "Bubbly", "Calm", "Capable", "Charismatic", "Charming", "Cheerful", "Clever", "Colorful", "Compassionate", "Confident", "Cooperative", "Courageous", "Courteous", "Creative", "Curious", "Dazzling", "Dedicated", "Delightful", "Determined", "Diligent", "Dynamic", "Easygoing", "Effervescent", "Efficient", "Elegant", "Empathetic", "Energetic", "Enthusiastic", "Exuberant", "Faithful", "Fantastic", "Fearless", "Flexible", "Friendly", "Fun-loving", "Generous", "Gentle", "Genuine", "Graceful", "Gracious", "Happy", "Hardworking", "Harmonious", "Helpful", "Honest", "Hopeful", "Humble", "Imaginative", "Impressive", "Incredible", "Inspiring", "Intelligent", "Joyful", "Kind", "Knowledgeable", "Lively", "Lovable", "Lovely", "Loyal", "Majestic", "Magnificent", "Mindful", "Modest", "Passionate", "Patient", "Peaceful", "Perseverant", "Playful", "Polite", "Positive", "Powerful", "Practical", "Precious", "Proactive", "Productive", "Punctual", "Quick-witted", "Radiant", "Reliable", "Resilient", "Resourceful", "Respectful", "Responsible", "Sensitive", "Serene", "Sincere", "Skillful", "Soothing", "Spirited", "Splendid", "Steadfast", "Strong", "Supportive", "Sweet", "Talented", "Thankful", "Thoughtful", "Thriving", "Tranquil", "Trustworthy", "Upbeat", "Versatile", "Vibrant", "Vigilant", "Warmhearted", "Welcoming", "Wholesome", "Witty", "Wonderful", "Zealous"];
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue