From 2f2008d1882596e30547387f748922e0e62613db Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matej=20Ba=C4=8Do?= Date: Fri, 2 Feb 2024 11:21:44 +0000 Subject: [PATCH] PR review changes --- app/controllers/api/account.php | 2 +- app/controllers/shared/api.php | 2 +- app/controllers/shared/api/auth.php | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/controllers/api/account.php b/app/controllers/api/account.php index 96fd618abf..5af907da4a 100644 --- a/app/controllers/api/account.php +++ b/app/controllers/api/account.php @@ -1213,7 +1213,7 @@ App::post('/v1/account/tokens/email') ->desc('Create email token (OTP)') ->groups(['api', 'account', 'auth']) ->label('scope', 'sessions.write') - ->label('auth.type', 'emailOtp') + ->label('auth.type', 'email-otp') ->label('audits.event', 'session.create') ->label('audits.resource', 'user/{response.userId}') ->label('audits.userId', '{response.userId}') diff --git a/app/controllers/shared/api.php b/app/controllers/shared/api.php index 15d00ac99d..e32e393f70 100644 --- a/app/controllers/shared/api.php +++ b/app/controllers/shared/api.php @@ -338,7 +338,7 @@ App::init() } break; - case 'emailOtp': + case 'email-otp': if (($auths['emailOtp'] ?? true) === false) { throw new Exception(Exception::USER_AUTH_METHOD_UNSUPPORTED, 'Email OTP authentication is disabled for this project'); } diff --git a/app/controllers/shared/api/auth.php b/app/controllers/shared/api/auth.php index 254ea7f8e3..b62d07d962 100644 --- a/app/controllers/shared/api/auth.php +++ b/app/controllers/shared/api/auth.php @@ -31,7 +31,7 @@ App::init() } break; - case 'emailOtp': + case 'email-otp': if (($auths['emailOtp'] ?? true) === false) { throw new Exception(Exception::USER_AUTH_METHOD_UNSUPPORTED, 'Email OTP authentication is disabled for this project'); }