Files
famous-ly4-ev/app-modules/identity/routes/identity-routes.php
T
Nyan Lin Paing 914b7f97f3 Add phone-verified user registration
Two-step flow: request a one-time code by email/phone (RegistrationVerification,
mailed via RegistrationCodeMail, rate-limited by the new api-otp limiter keyed
to the identifier), then verify the code and register with RegistrationController.
User gains a phone column/fillable.
2026-08-30 14:53:18 +07:00

18 lines
823 B
PHP

<?php
use Illuminate\Support\Facades\Route;
use Modules\Identity\Http\Controllers\RegistrationController;
use Modules\Identity\Http\Controllers\TokenController;
Route::prefix('api/v1')->middleware(['api', 'throttle:api-auth'])->group(function () {
Route::post('/auth/token', [TokenController::class, 'store'])->name('identity.auth.token');
Route::post('/auth/registration/request-code', [RegistrationController::class, 'requestCode'])
->middleware('throttle:api-otp')
->name('identity.auth.registration.request-code');
Route::post('/auth/registration/verify-code', [RegistrationController::class, 'verifyCode'])
->name('identity.auth.registration.verify-code');
Route::post('/auth/register', [RegistrationController::class, 'store'])
->name('identity.auth.register');
});