1
0
Fork 0
mirror of synced 2024-10-01 01:37:56 +13:00

chore: update endpoint

This commit is contained in:
Christy Jacob 2024-01-29 17:48:12 +00:00
parent 0ff6e99354
commit 47fc6efb0d
2 changed files with 8 additions and 2 deletions

View file

@ -335,7 +335,7 @@ App::init()
break; break;
case 'magic-url': case 'magic-url':
if ($project->getAttribute('usersAuthMagicURL', true) === false) { if (($auths['usersAuthMagicURL'] ?? true) === false) {
throw new Exception(Exception::USER_AUTH_METHOD_UNSUPPORTED, 'Magic URL authentication is disabled for this project'); throw new Exception(Exception::USER_AUTH_METHOD_UNSUPPORTED, 'Magic URL authentication is disabled for this project');
} }
break; break;

View file

@ -32,7 +32,7 @@ App::init()
break; break;
case 'magic-url': case 'magic-url':
if ($project->getAttribute('usersAuthMagicURL', true) === false) { if (($auths['usersAuthMagicURL'] ?? true) === false) {
throw new Exception(Exception::USER_AUTH_METHOD_UNSUPPORTED, 'Magic URL authentication is disabled for this project'); throw new Exception(Exception::USER_AUTH_METHOD_UNSUPPORTED, 'Magic URL authentication is disabled for this project');
} }
break; break;
@ -43,6 +43,12 @@ App::init()
} }
break; break;
case 'phone':
if (($auths['phone'] ?? true) === false) {
throw new Exception(Exception::USER_AUTH_METHOD_UNSUPPORTED, 'Phone authentication is disabled for this project');
}
break;
case 'invites': case 'invites':
if (($auths['invites'] ?? true) === false) { if (($auths['invites'] ?? true) === false) {
throw new Exception(Exception::USER_AUTH_METHOD_UNSUPPORTED, 'Invites authentication is disabled for this project'); throw new Exception(Exception::USER_AUTH_METHOD_UNSUPPORTED, 'Invites authentication is disabled for this project');