How to implement google oauth in cakephp using cakedc / users?

I am trying to add an input layer using CakeDC / user plugin using linkedin and google. The linkedin id is working fine, but I can’t determine the google login. Follow everything in the tutorial login using google oauth

I get the code in the url returned from google / auth, but the authuser parameter value is returned as 0.

At developers.google, I found that if the code parameter is returned, the application is authenticated.

The user is not added to the users table, nor does it change in the social_accounts table, and the flash message is displayed as "You do not have access to this location."

+5
source share
1 answer

To make Google OAuth work, you need to create an OAuth 2.0 client ID under credentials ( https://console.developers.google.com/ ).

Then you need to enable the Google+ API under the control panel (this is the step you might have skipped). If you do not enable the API, Google will not return user data, and you will describe the behavior you described.

+1
source

Source: https://habr.com/ru/post/1267271/


All Articles