mirror of
https://github.com/delight-im/PHP-Auth.git
synced 2025-08-06 08:07:27 +02:00
Create method 'Auth::createSelectorForOneTimePassword'
This commit is contained in:
@@ -1922,6 +1922,13 @@ final class Auth extends UserManager {
|
||||
);
|
||||
}
|
||||
|
||||
private static function createSelectorForOneTimePassword($otpValue, $userId = null) {
|
||||
$userId = !empty($userId) ? (int) $userId : 0;
|
||||
$key = $userId . '#' . $otpValue;
|
||||
|
||||
return \substr(\sha1($key, false), 0, 24);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the selector of a potential locally existing remember directive
|
||||
*
|
||||
|
Reference in New Issue
Block a user