Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Undefined index: emails" in Microsoft provider when email is not requested #145

Open
wooky opened this issue Mar 22, 2021 · 0 comments
Open
Labels

Comments

@wooky
Copy link

wooky commented Mar 22, 2021

Hey!

Issue

I have my scope set to ['wl.basic'] because I don't need to get the user's email. This causes an exception to be thrown:

Uncaught PHP Exception ErrorException: "Notice: Undefined index: emails" at .../vendor/socialconnect/auth/src/OAuth2/Provider/Microsoft.php line 68

Adding 'wl.emails' to the scope makes it go away, but I don't need email. Instead, replacing $response['emails'] on line 68 with isset($response['emails']) would fix the issue altogether.

My env

PHP: 7.4.14

Library: socialconnect/auth 3.2.2

Provider: Microsoft

Provider options:

[
    'options' => []
];

Thanks 😺

@ovr ovr added the bug label Apr 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants