socialite-discord-provider
socialite-discord-provider copied to clipboard
Can't seem to get this working
I have Google OAuth working perfectly, however I get a 401 Unauthorized when I'm trying to fetch the Discord user from the callback.
Route::get('/auth/discord', function () {
return Socialite::driver('discord')->redirect();
});
Route::get('/auth/discord/cb', function () {
try {
$user = Socialite::driver('discord')->user();
dd($user);
return;
} catch (Exception $e) {
dd($e);
return Redirect::to('/auth/discord');
}
});
Here's the error message -
Client error: `POST https://discord.com/api/oauth2/token` resulted in a `401 Unauthorized` response:
{"error": "invalid_client"}
I just got this working, by the looks of it your client or secret isnt set.