add random token generator
This commit is contained in:
parent
a0bea204b4
commit
07040851ec
1 changed files with 11 additions and 0 deletions
11
app/Auth/RandomTokenGenerator.php
Normal file
11
app/Auth/RandomTokenGenerator.php
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
<?php
|
||||
|
||||
namespace App\Auth;
|
||||
|
||||
class RandomTokenGenerator implements TokenGenerator
|
||||
{
|
||||
public function generate(): string
|
||||
{
|
||||
return bin2hex(random_bytes(32));
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue