Social module google+ provider confusion
Created 6 years ago by dnc123

Hey guys, got problems with social module(login with google) :/

I've set client ID and client secret on google+ provider. I'm rendering login button like this: <a href="{{ url_route('anomaly.module.social::providers.auth', {'provider': 'google'}) }}">Login with Google</a>

When I attempt to login with this button I don't get logged in and am redirected to https://www.my-website.com/social/google/callback?state=SNZAde1fpCIpHasGPNsE0JIzUjiX43gADBe8vqei&code=4/AACvScjndRcP-sCvea1dY4kgfCJBn0sldVyzpiq9vjZRVPHALuC_sKUJADEl1PJL5X8eW4DRRVMIEPElsy9ltBo&authuser=0&session_state=53f613d5790811aead2d51685c6bfc5c59a0d1e5..b45e&prompt=none#.

Though if I try to login with the button in CP module, then I get authenticated, though login button doesn't get red saying disconnect (like login with facebook), and I end up in this URL: /social/google/callback?state=b79AtIRANqSyovYOedqKxtXAd3wllCOJxdAKuwYP&code=4/AADNX6EZAu1OymUBA3jPngFf0LiyhlD7D-QrIfweZfELxydnFQcA7LJ5Xv5ziX8-LFWqbCYllZKSyYAv9IqPPK8&authuser=0&session_state=231e3cf13851fe59bc98e7c3dcff2e87428a87bc..960c&prompt=none#, which looks the same to me, but it somewhat works. Why isn't my button working and the button in CP partly works?

ryanthompson  —  6 years ago

Can you post some more information on what is being shown you to if any errors? I can't tell much just from the URLs.

What scopes do you have enabled for the provider?

dnc123  —  6 years ago

There are no errors, I'm just getting redirected to the link I provided, I'm using default scopes - openid, email and profile. I've also noticed that when I attempt to login there's a GET request sent to https://accounts.google.com/o/oauth2/auth with the following params - client_id =700866340215-h49du7b3dj1hoe4lm9tr03q1bhf66v6u.apps.googleusercontent.com, redirect_uri = https://www.minfo.lt/social/google/callback, scope = openid profile email, response_type = code, state = Pkvn6gTUIsl8ZK1ZSRfSh4Cxa8IJzEFdmE6407J3.

dnc123  —  6 years ago

Still relevant

ryanthompson  —  6 years ago

Ill do some testing on this today and report back.