feat: implement premium Email 2FA authentication integrated with auth flow

This commit is contained in:
2026-05-21 21:46:53 +07:00
parent a0673129ee
commit 0d083765ff
50 changed files with 543 additions and 162 deletions
@@ -0,0 +1,28 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
public function up(): void
{
Schema::table('users', function (Blueprint $table) {
$table->boolean('email_2fa_enabled')->default(false)->after('two_factor_confirmed_at');
$table->string('email_2fa_code')->nullable()->after('email_2fa_enabled');
$table->timestamp('email_2fa_expires_at')->nullable()->after('email_2fa_code');
});
}
public function down(): void
{
Schema::table('users', function (Blueprint $table) {
$table->dropColumn([
'email_2fa_enabled',
'email_2fa_code',
'email_2fa_expires_at',
]);
});
}
};