Needs review
Project:
OAuth Connector
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
29 Dec 2010 at 23:48 UTC
Updated:
16 Oct 2012 at 04:41 UTC
Jump to comment: Most recent file
Comments
Comment #1
merlinofchaos commentedFor this patch to work, there is also a small patch needed to connector. Attached here for convenience.
The connector patch is actually against the alpha; I hadn't noticed until just now that the -dev is actually quite a bit different. Not sure if that invalidates the patch or not.
Comment #2
voxpelli commentedIf you know that the external usernames are unique, as they are on eg. Twitter and Digg, you can use them as the user id:s on a connector. The user id doesn't have to be a number, just something unique that tells us which local user to log in. I used that approach when testing OAuth Connector with Digg: https://gist.github.com/759648 While the result wouldn't be as beautiful as in your patch, it would at least solve the problem of recognizing which users are which.
Names aren't required for a connector as they are purely for presentation purpose - so we can't rely on them. Names also doesn't have to be unique so if eg. two John Smiths logs in from LinkedIn the usernames would conflict with your patch.
I like the idea of usernames formatted by tokens - will look into it - as you say it would probably be the best solution.
Regarding difference between alpha and dev on drupal.org - I don't see any difference?
Comment #3
merlinofchaos commentedI've thought a little more about this, and I realize that what I care about is the actual username; but the $username variable ends up being used for the authname as well as the username. The two absolutely do not need to be the same thing, so I think there definitely needs to be some more thought applied to this.
Comment #4
voxpelli commentedThe two should be separated - I agree.
Comment #5
iainhallam commentedBeginning to look at these Connector modules; I think usernames based on tokens would be a very nice way of doing things.
Comment #6
adumicic commentedHas there been any movement on this issue?
Comment #7
xamanu commentedI rerolled this patches for the newer dev branches of OAuthConntector and Connector module. I extended the patches a little bit:
* "authname" and "username" do not have to be the same anymore (username can be changed and it keeps working)
* Username gets generated based on the field specified on the OAuth Connector Provider configuration for "Name".
* If a username already exists a "_n" (with n as counting numbers) gets appended.
Comment #8
xamanu commentedRerolled patch from #7 to avoid same problem as mentioned in #1813858: Redundant argument in some _oauthconnector_fetch_field function calls.