yii2-eauth icon indicating copy to clipboard operation
yii2-eauth copied to clipboard

Authorization with Google is not working

Open jainarpit014 opened this issue 7 years ago • 7 comments

It doesn't work on the demo as well.

  1. Try to Signin with google
  2. Logout
  3. Sign in again with google http://nodge.ru/yii-eauth/demo2/login

jainarpit014 avatar Aug 21 '18 13:08 jainarpit014

I solve this poblem: In /vendor/nodge/yii2-eauth/src/oauth2 in function getCallbackUrl need replace foreach (['code', 'state', 'redirect_uri'] as $param) {

to

foreach (['code', 'state', 'redirect_uri', 'scope'] as $param) {

web-rider avatar Sep 19 '18 10:09 web-rider

@web-rider works like a charm. Thank you

manos-k avatar Sep 20 '18 10:09 manos-k

@web-rider works,thanks

xr0m3oz avatar Sep 27 '18 13:09 xr0m3oz

Yes, it works. Thanks a lot!

Ravi-Seffcon avatar Sep 28 '18 08:09 Ravi-Seffcon

Need to add a fix to the main code, to be able to update through the composer. @Nodge

xr0m3oz avatar Sep 28 '18 08:09 xr0m3oz

There's already a pull-request for this. I don't think this repo is maintained anymore. Also, you may want to follow this pull request and move that specifically to the Google OAuth Class so it has no detrimental impacts to any other services

Pull Request https://github.com/Nodge/yii2-eauth/pull/120

Rjgoolsby avatar Sep 28 '18 11:09 Rjgoolsby

There is an other one to unset 'hd' after that pull request #120

It must be like this way

foreach (['code', 'state', 'redirect_uri', 'scope', 'authuser', 'prompt', 'session_state', 'hd'] as $param) {
	if (isset($route[$param])) {
		unset($route[$param]);
	}
}

ramssesable avatar Jun 20 '19 01:06 ramssesable