-
Notifications
You must be signed in to change notification settings - Fork 598
Return givename and surname claims from Facebook provider by default. #688
Comments
We want to keep the defaults to minimum required functionality. Google is an interesting comparison, but what do the next 5 do? MSA, Twitter, Yahoo, Github, LinkedIn, etc.. https://github.com/aspnet-contrib/AspNet.Security.OAuth.Providers/tree/dev/src |
I used Google as between it and Facebook they hold the 80% market share depending on what sources you look at. |
OK I accept your point its hard to be consistent with so many providers doing there own thing.. Out of interest what is the functional minimum for a provider |
Looking at the providers there seems a lot of inconsistency in the claims available. It seems reasonable and not anymore inconsistent than things already are to request these two fields to align with Google for common scenarios. However if you don't agree that's also a reasonable angle so please close. |
@mikes-gh I support your issue and appreciate your well thought-out reasoning. |
@mikes-gh curious: why closing this thread? You had a valid point. |
Reopening as there seems to be some support for this. |
Even Microsoft thinks its a good idea to return given name and surname claims by default |
We don't think it's a good idea in general for the middleware to alter what a service considers to be its own defaults. If the identity provider changes what it offers, it's a best practice to explicitly add the claims requests or scopes to the auth process. |
@Eilon I'm not sure to understand your point. A few months ago, folks at Facebook have decided to remove their old endpoints and to update their Graph API to include a This ticket is only about adding |
@Eilon if you use this argument then Facebook should return no fields as that is the default. Do we want that? If you don't give a good set of defaults you put the burden back to the programmer to discover the Facebook graph Api fields fuctilnallity, I thought one of the points of the oauth provider is to minimise the inconsistencies between providers. |
I agree, the middleware should normalize oauth and aim for the 80/20 rule and reduce the amount of custom code needed. |
Do folks have an idea on where we would draw the line? Ultimately every provider will have its own set of data with whatever keys they want. For some it will just be "full name" (because the concept of a "first" and "last" name being separate fields makes little sense), so what then? Plus, for some providers these fields might require additional authorization that might not be needed for a particular app. This could cause an auth failure. I honestly don't mind too much that we add some fields, I just want to make sure it's for the right reasons. As far as the Facebook provider adding some extra fields, well, I don't really like that either, for all the same reasons 😄 |
Discussed with @Tratcher @hao @blowdart @vibronet @brentschmaltz and we concluded this would be a slippery slope: what about middle name? Age? Etc. We feel that it's easy enough to add the fields in the |
Age? AFAIK, none of the built-in providers retrieves or stores it. This ticket is all about consistency, not exhaustiveness. Currently, a developer using |
@PinpointTownes @elion |
I guess the question is: what's so special about these fields? What you're saying might be true about |
They are common registration fields returned by the other market leading providers.
Not really . Facebook would change the version of its api so the provider would need updating with new urls etc (as in the past)
Every one except Facebook (AFAIK) works at the scope level. What fields are defined at he scope level is up to the provider..Facebook is the odd one out as it allows you to specify exactly which fields you want so in effect there are no defaults. So why not take advantage of this to make Facebook more like Google to give further abstraction of the implementation details to the developer. |
I deci |
Oh weird I don't know where that random text came from! I'm drinking my Starbucks Chai Tea Latte right now, no alcohol yet today 😄 |
Are you leaning enough for a PR to add these 2 claims before rc2 Code changes required are
to FacebookOptions constructor so minimal risk testing etc |
@mikes-gh by all means send a PR and we'll have a look. I still have to convince my colleagues, though 😄 |
I'd rather not pollute the system until a decision is made here. |
Do you want me to do a PR? I did the PR for adding all the facebook field processing so I am farmiliar with this code |
If you have the time, sure 😄 |
OK leave it with me I will do it this weekend. |
Thanks! If there's a logical place to add a test, please try to do so as well (I'm not quite sure what type of tests we have for the Facebook provider already). |
Unfortunately I can no longer compile in VS 2015 Steps I am taking
Rebuild Solution in VS gives loads of error NU1008: "netstandard1.3" is an unsupported framework. Apologies probably a known thing. |
I recommend using the command line for now. |
Still no joy
|
I just did a clean clone and it's building just fine. Perhaps clear out these folders too?
? |
Must be something wrong with my environment.
Still getting
Output enclosed
|
Hmm I dunno, that's pretty weird. I was able to do several successful clean builds (on brand new clones). |
A few other folders to try clearing out:
|
I wonder if its a powershell thing I see the build scripts changed to powershell recently.
|
I ran the build from a CMD window. But apparently we do require PowerShell 4 (which Windows 7 doesn't have by default). Here's what I have on Windows 10:
|
BTW logged a bug here to show some better error if the PowerShell version is too old: aspnet/KoreBuild#30 |
Unfortunately powershell 5 gives same result. Command
Result
Doing a debug it seems dotnet restore does not supply any credentials to my proxy when in a powershell script. Thing used to work so it seems the new build scripts are not proxy friendly. |
I know things are really busy round here so don't spend too much time looking at this. @Tratcher
Its a bit nitty.
If you don't think this is going anywhere please close.
I would like to (re)present my reasons for this.
http://schemas.xmlsoap.org/ws/2005/05/identity/
claimsCurrently
Using the social sample and a minimal setup
Google
Returns
Facebook
returns
Would it make sense to add?
To the Facebook options
The text was updated successfully, but these errors were encountered: