Comments (20)
Found it!
After sifting trough the documentation I finally discovered that emails are not given via this url:
https://api.github.com/user?access_token=...
You need this url:
https://api.github.com/user/emails?access_token=...
For more info: http://developer.github.com/v3/users/emails/
Maybe it should be added to the library... Any suggestions?
from oauth2-client.
Does the GitHub API return an email? Some Apis don't.
Sent from my iPhone
On Jul 8, 2013, at 6:08 PM, Jean-Nicolas Boulay [email protected] wrote:
For some reason I cannot get the email of my GitHub.
I tried to dig in the code did not find anything.
I even added the scope:
public $scopes = array('user:email');
I also tried:public $scopes = array('user');
I get NULL.It also seems that other information are not loading:
string(3) "uid"
int(--------) -> this works but I hid it.
string(8) "nickname"
string(5) "jnbdz"
string(4) "name"
string(19) "Jean-Nicolas Boulay"
string(9) "firstName"
NULL
string(8) "lastName"
NULL
string(5) "email"
NULL
string(8) "location"
NULL
string(11) "description"
NULL
string(8) "imageUrl"
NULL
string(4) "urls"
array(2) {
["GitHub"]=>
string(18) "http://github.com/"
["Blog"]=>
NULL
}
—
Reply to this email directly or view it on GitHub.
from oauth2-client.
Also when I do:
dd(json_decode($response));
In public function getUserDetails, I get allot of other information but not the email and I have notice that the name of some of the values have changed. For exemple it's not imageUrl it is now: avatar_url.
Also found another bug in the code:
$user->urls = array(
'GitHub' => 'http://github.com/'.$response->login,
'Blog' => $response->blog,
);
It used to be like this:
$user->urls = array(
'GitHub' => 'http://github.com/'.$user->login,
'Blog' => $user->blog,
);
That's why it was empty.
from oauth2-client.
I haven't tried manually. But when I force it with:
dd(json_decode($response));
I still get a email null.
from oauth2-client.
Maybe?
Phil Sturgeon
On Tuesday, July 9, 2013 at 12:41 AM, Jean-Nicolas Boulay wrote:
Found it!
After sifting trough the documentation I finally discovered that emails are not given via this url:
https://api.github.com/user?access_token=...
You need this url:
https://api.github.com/user/emails?access_token=...
Maybe it should be added to the library... Any suggestions?—
Reply to this email directly or view it on GitHub (#9 (comment)).
from oauth2-client.
I actually started modifying OAuth-Client to support other OAuth2 providers but also Twitter new API. I will post a link when I am done to my version of oauth-client.
from oauth2-client.
This is an OAuth 2 client, not an OAuth 1 client. Don't mix the two in together, it gets silly.
Phil Sturgeon
On Thursday, July 11, 2013 at 12:31 PM, Jean-Nicolas Boulay wrote:
I actually started modifying OAuth-Client to support other OAuth2 providers but also Twitter new API. I will post a link when I am done to my version of oauth-client.
—
Reply to this email directly or view it on GitHub (#9 (comment)).
from oauth2-client.
Yah! lol I just realize... That Twitter was using OAuth1.0a or just 1? Anyways... The same with Yahoo... I was trying to add support for other OAuth providers... But now I am seeing that some are using OAuth1/1.0a.
But WordPress seems to be using OAuth2 but the token needs to be put in the header... So I added that option in the code. I haven't change anything for OAuth1. I am thinking of using another PHP lib for that.
from oauth2-client.
Yeah 1 and 2 need to remain separate, we're working on on for OAuth 1 now. Then an abstraction lib can sit on top, but the components need to be separate.
Phil Sturgeon
On Thursday, July 11, 2013 at 12:44 PM, Jean-Nicolas Boulay wrote:
Yah! lol I just realize... That Twitter was using OAuth1.0a or just 1? Anyways... The same with Yahoo... I was trying to add support for other OAuth providers... But now I am seeing that some are using OAuth1/1.0a.
But WordPress seems to be using OAuth2 but the token needs to be put in the header... So I added that option in the code. I haven't change anything for OAuth1. I am thinking of using another PHP lib for that.—
Reply to this email directly or view it on GitHub (#9 (comment)).
from oauth2-client.
You work for php-loep?
from oauth2-client.
I see that php-loep has a OAuth1 lib... But it's empty. Not very practical. Do you guys need help? I am willing to help, now. Because I really needed it.
from oauth2-client.
php-loep is a Github organisation which stands for "PHP League of Extraordinary Packages"
On 11 Jul 2013, at 17:55, Jean-Nicolas Boulay [email protected] wrote:
You work for php-loep?
—
Reply to this email directly or view it on GitHub.
from oauth2-client.
The OAuth 1 client is being worked on by @bencorlett. Ask him if he'd like some help.
from oauth2-client.
Sorry it's getting a bit out of subject, but Google forces me to check if I accept my application to talk to it every time I try to get a new token. Other services just ask once.
from oauth2-client.
There's actually a query parameter for that, see approval_prompt
.
from oauth2-client.
Thanks! I will look into it.
from oauth2-client.
The Google issues are being taken care of elsewhere.
If anyone is interested in updating GitHub to get the email address back they are welcome to do so in a PR.
from oauth2-client.
PR?
from oauth2-client.
PR = Pull Request.
from oauth2-client.
PR = Please Reply
On Tue, Nov 26, 2013 at 11:58 PM, Phil Sturgeon [email protected]:
PR = Pull Request.
—
Reply to this email directly or view it on GitHubhttps://github.com//issues/9#issuecomment-29304139
.
from oauth2-client.
Related Issues (20)
- Deprecated function: Return type HOT 1
- Oauth2 refresh problems HOT 1
- AccessToken setTimeNow is useless function
- PHP Combability issue
- Security issue HOT 1
- Basic example improvements HOT 1
- Basic example improvements (2)
- Allow any psr-18 http client (instead of requiring guzzle) HOT 1
- Security vulnerabilities in specific guzzlehttp/guzzle versions
- Error fetching OAuth credentials: "Missing required parameter [code_verifier]."
- Logout HOT 2
- Class 'Illuminate\Support\Facades\Http' not found
- Suddenly getting error Class "djchen\OAuth2\Client\Provider\Fitbit" not found
- Issue with generating and validating the same token.
- ID Token for access token possible? HOT 1
- New stable release? HOT 6
- pkce no longer appears in src/Provider/AbstractProvider.php HOT 4
- Create multipart/form-data requests? HOT 1
- Support for PHP 8.2? HOT 1
- PKCE: Unset oauth2pkceCode from session after login?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from oauth2-client.