Add google_2fa_ts column to users table

Add a timestamp to the database users table to prevent replay and code reuse attacks.

Signed-off-by: TechNoNerd87 <113461509+TechNoNerd87@users.noreply.github.com>
This commit is contained in:
TechNoNerd87 2025-11-24 13:59:22 -06:00 committed by GitHub
parent e308b334c1
commit 193cc5358f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 83 additions and 0 deletions

View File

@ -0,0 +1,83 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::table('users', function (Blueprint $table) {
$table->integer('google_2fa_ts')->nullable()->after('google_2fa_secret');
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::table('users', function (Blueprint $table) {
$table->dropColumn('google_2fa_ts');
});
}
};