Hey there,
I have problem with validating user logged in with Google on Android client, Server side is Laravel, In other side when user logged in, it gives me a token that i must verify with Google,
Im using Socialite package, i don't know how i must get user from token, it has an method named getUserFromToken but it occurs many errors,
Which credentials OAuth i must use from google console? Im just using Web Application credentials but no answer!
Code is something like this:
$user = \Laravel\Socialite\Facades\Socialite::driver('google')->userFromToken($googleAuthCode);
dd($user);
and error is:
Client error:
GET https://www.googleapis.com/userinfo/v2/me?prettyPrint=falseresulted in a401 Unauthorizedresponse: { "error": { "code": 401, "message": "Request is missing required authentication credential. Expected OAuth 2 (truncated...)
What i must add to the request?!
Thanks