I have facebook and google login using socialite, facebook works but google I've only managed to get to work locally, so for example locally the url is http://dev.thesite.com and in production the url is https://thesite.com, that's the only difference, however when trying to log in with google in production i always get the invalidState exception
I've noticed that when I get the InvalidStateException
, under environment and details
I have:
REQUEST_URI "/login/google/callback?state=EoWyQabT7M6wFKbPWyNJ5UD1jpLaID8v0RylvWll&code=4%2FuAFENTN62cKi-HJH7MLDFnrn8LtALjwi0zpd1Fmx688A6Vj_uSMDPk-p5EtQl_GayYKtcasjInfPjL6gfSImto8&scope=email+profile+openid+https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fuserinfo.profile+https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fuserinfo.email&authuser=0&session_state=84bdbb33a08cc16bbaf7584540c9b97deca3dafb..5d5c&prompt=consent"
QUERY_STRING ""
So the QUERY_STRING
is empty for some reason.
My .htaccess files redirects all requests to https, I believe that maybe some .htaccess setting can solve this.