Admin two-factor authentication (mandatory for admins), users:create command, operations handbook
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
dea1029225
commit
13760f2c02
11 files changed
+353
-3
No files matched your search
@@ -32,9 +32,18 @@ public function definition(): array
|
||||
'password' => static::$password ??= Hash::make('password'),
|
||||
'remember_token' => Str::random(10),
|
||||
'role' => UserRole::Admin,
|
||||
'app_authentication_secret' => 'JBSWY3DPEHPK3PXP',
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* Indicate that the user has not set up two-factor authentication yet.
|
||||
*/
|
||||
public function withoutTwoFactor(): static
|
||||
{
|
||||
return $this->state(fn (): array => ['app_authentication_secret' => null]);
|
||||
}
|
||||
|
||||
public function role(?UserRole $role): static
|
||||
{
|
||||
return $this->state(fn (): array => ['role' => $role]);
|
||||
|
||||
Reference in new issue
Block a user