S
S
Sa7ha_S2018-03-16 17:21:35
Google
Sa7ha_S, 2018-03-16 17:21:35

How to make authorization through Google for API on Laravel?

There is an Android application, there is also an API written in Laravel, normal authorization works without problems, the problem occurs when I try to get user information from Google, for access I use the token that comes from the application and the google driver in Socialite, as follows:

$user = Socialite::driver('google')->userFromToken($request->access_token);

I get the following error:
5aabd2a526bc7098834492.png
I found a solution to the problem here:
https://stackoverflow.com/questions/38737685/googl...
But I don't understand why Socialite cannot get information with an already existing token that came from the application?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question