Closed dac514 closed 7 years ago
urlUserEmails()
is a method that doesn't exist. I assume it exists because of a previous configuration that wouldn't be used.
According to github docs:
Note: The returned email is the user's publicly visible email address (or null if the user has not specified a public email address in their profile).
So unless a user has a public email, the resource owner response will have a null
email.
Your work around for fetching all available emails is correct in this situation.
So unless a user has a public email, the resource owner response will have a null email.
Doh, makes sense. Please close.
2020 here, i am not entirely convinced, as i have a public one set and it still returns null. the work around above even shows it as public heh.
Steps to reproduce (where $access_token is valid)
Expected: Email Actual: null
Possibly related
This test is commented out?
//$this->assertEquals($this->provider->domain.'/api/v3/user/emails', $this->provider->urlUserEmails($token));
Source: https://github.com/thephpleague/oauth2-github/blob/master/test/src/Provider/GithubTest.php#L110
Workaround (where $access_token is valid)