Temporary User Tokens maybe generated for a number of reasons. An example usecase scenario for Authentication would be automatically logging the user in once after registration.
The SSOfy\Laravel\UserTokenManager
service class can be instantiated either directly or via Facade:
$token = SSOfy::userTokenManager()->randomStringToken($userId);
You may also generate OTP for identity verification for Email and SMS:
$token = SSOfy::userTokenManager()->randomDigitsToken($userId, $ttl, $length);
The package provides commands for token generation and verification. When doing tests, commands can be used to generate authentication tokens or email/sms verification codes.
php artisan ssofy:token-gen USERID
php artisan ssofy:token-verify TOKEN
php artisan ssofy:token-delete TOKEN