Open
Description
I'm building a rest api and connect discord OAuth, I have this code:
public function __invoke(Request $request)
{
$discordUser = Socialite::driver('discord')->stateless()->user();
$user = User::where('discord_id', $discordUser->id)->first();
But when trying to execute this I'm getting the following error:
Client error: `GET https://discord.com/api/users/@me` resulted in a `401 Unauthorized` response: {"message": "401: Unauthorized", "code": 0}
It seems like it's not using the right key/code/bearer, how would I be able to fix this?