OAuth2 icon indicating copy to clipboard operation
OAuth2 copied to clipboard

Issue with multiple emails from eg. Google

Open Spriz opened this issue 8 years ago • 3 comments

In my case, Google returns multiple email addresses, so the code @ https://github.com/UseMuffin/OAuth2/blob/master/src/Auth/OAuthAuthenticate.php#L193 doesn't seem to work.

I'm not quite sure in which package this issue should be corrected though 🤔

Example of the object: image

Spriz avatar Apr 27 '17 06:04 Spriz

For anyone searching for a fix i pushed a pull request for this

https://github.com/UseMuffin/OAuth2/pull/18

LorenzoRogai avatar Dec 23 '17 15:12 LorenzoRogai

Link fix: https://github.com/UseMuffin/OAuth2/pull/18

Spriz avatar Dec 26 '17 11:12 Spriz

Wouldn't simply using the mapFields option as

'mapFields' => ['email' => 'emails.0.value']

solve the problem?

ADmad avatar Nov 26 '18 14:11 ADmad