Active
Project:
OAuth2 Login
Version:
7.x-1.7
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
15 Sep 2015 at 04:31 UTC
Updated:
16 Sep 2015 at 14:57 UTC
Jump to comment: Most recent
Upon successful authentication redirection from "login?destination=oauth2/authorize" to the sign in page on "oauth2_login" there are Notices seen on the page.
Steps to reproduce:
1. Navigate to "/oauth2_login"
2. User is redirected to: "login?destination=oauth2/authorize"
3. Provide the user name and password
4. Login
Issue : There are Notices on the page.
Snapshot attached for reference.
| Comment | File | Size | Author |
|---|---|---|---|
| NoticeSSO.png | 15.74 KB | avni09 |
Comments
Comment #2
dashohoxha commentedIt gives no notices for me. Check it here: https://l10n.org.al (and then click on login).
Hint: Look for the error on the module oauth2_loginprovider because that is the one that sends the user profile.
Another possibility can be the library hybridauth-drupaloauth2, used by hybridauth to get the user profile.
Comment #3
karthikkumarbodu commentedThe notice is from hybridauth module. Added a patch to fix the notice
Issue Link : https://www.drupal.org/node/2569349
Comment #4
avni09 commentedVerified. No more notices appearing now :)
Thanks @dashohoxha and @karthikkumarbodu.
Comment #5
dashohoxha commentedOne solution is to implement this hook on the server:
And then implement this hook on the client:
Another solution is to support the field
profileURLin the module oauth2_loginprovider itself, and in the library hybridauth-drupaloauth2. Which one do you think is better?Comment #6
karthikkumarbodu commentedI feel the second solution is a precise one as the changes will be part of the contributed module and library.
New users don't need to implement the two hooks which you suggested.
Comment #7
dashohoxha commented@karthikkumarbodu: Exactly, I totally agree with you.
@avni09: Sure, but it only hides the problem. The problem is that the field 'profileURL' is missing from the profile. Maybe this doesn't matter, but maybe the module hybridauth needs to use it, and an empty value is not good. I don't know the details of hybridauth (it is too big to study).
Comment #8
dashohoxha commentedHere are the patches that fix this issue:
- https://github.com/dashohoxha/oauth2_loginprovider/commit/4bc3bf259211fd...
- https://github.com/B-Translator/hybridauth-drupaloauth2/commit/78163cfcb...
There is also a new release (1.6) for the module oauth2_loginprovider that includes this patch.
For hybridauth-drupaloauth2 you have to make a `git pull` (and then copy DrupalOAuth2.php to the proper place in hybridauth).
Comment #9
dashohoxha commentedI am leaving this issue open, because it somehow documents an undocumented feature of (oauth2_loginprovider + oauth2_login), namely that the application can modify the user profile as it likes (through using hooks).
I do this in my application for my needs, but the other people may not be aware of it.
Comment #10
karthikkumarbodu commentedDear Dashamir, Please update the patch here as well
https://github.com/hybridauth/hybridauth/blob/master/additional-provider...
I can see you are the contributor of the Drupal OAUTH2 Provider.
Comment #11
dashohoxha commentedYes I am, but I don't have commit access on the hybridauth repository on GitHub, so I don't know when it will be accepted, and when it will be included on a stable release of hybridauth. So, you better don't rely on that repo, just use the one that I can manage myself.
If you want you can submit a patch for it and be a maintainer of it (just sync it with my repo). But I am not going to do it.
I was once a maintainer of hybridauth, had disagreements with other maintainers about how it should be managed, and then I left. My opinion is that each contributed provider module is better maintained and managed in its own separate repository, having its own releases, maintainers (with commit rights), and so on.
Comment #12
karthikkumarbodu commentedYes i agree with you about maintaining separate repositories for contributed providers. I will not create a PR with the new changes. I will rely only on your repository.