1

i have a laravel api that doesnt use a database. I use my own logic to log the user in using a custom auth provider. When someone wants to log in, they send an api call which at the moment, logs them in using laravel Auth and sends back the users id

$user = 1;
$logThemIn = true;

if ($logThemIn)
{
    auth()->login($user);
    //Send back oauth2 token
    return Auth::User();
}

What im now trying to do is generate a access token. As im not using a database, Auth doesnt generate me one by default. How would i manually generate an Oauth2 token? thanks

Will Daniels
  • 135
  • 1
  • 10

0 Answers0