79206730

Date: 2024-11-20 10:18:00
Score: 3
Natty:
Report link

Do you have the HasApiTokens trait in your User model?

I would also say try to explicitly use the sanctum guard then share response.

public function getMe(Request $request): JsonResponse
{
 // Explicitly use sanctum guard
 $user = auth('sanctum')->user();

 // Die and dump user to see what you're getting back on login
 dd($user);

 return ApiResponse::success('', ['user' => $user]);
}
Reasons:
  • RegEx Blacklisted phrase (2.5): Do you have the
  • Has code block (-0.5):
  • Contains question mark (0.5):
  • Low reputation (0.5):
Posted by: Kyle Mabaso