0
votes

I have successfully authenticated users in my front-end via passport api.

But now i want to implement the Laravel socialite to connect/link their account to my app. So i want to get the authenticated user in routes/web.php because i put my redirects and callbacks in there.

I tried adding the auth:api in routes/web.php but still no luck.

Is there a way to get the authenticated user in web routes? or is there a way i can use Laravel/socialite with Laravel/Passport ?

Thank you

1

1 Answers

0
votes

I know a way to get the authenticated user with this method:

Route::get('get/user', function (\Illuminate\Http\Request $request) {
      $user = $request->user();
  });