Closed (fixed)
Project:
OpenID Connect / OAuth client
Version:
8.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Reporter:
Created:
6 Apr 2017 at 04:50 UTC
Updated:
9 Apr 2018 at 05:21 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
mikejw commentedAnd here is the patch.
Comment #3
mikejw commentedComment #4
mikejw commentedOk, have added in the ability for hooks to return an account so that you could then link it to another account by some mechanism.
Comment #5
yannickooThank you for this patch mikejw, it works super nice in combination with the implemented hook so I can automatically connect users:
Comment #6
yannickooIt seems like you forgot to pass
$subinopenid_connect_connect_current_userwhich results inComment #7
harora commented#4 works but patch has use statement which is already there in code.
Here is the new patch.
Comment #8
yannickooOh that's true, we need to re-roll the patch. Unfortunately your patch does not include the missing
$subvariable which I noticed in #6.Comment #9
hugovk commentedComment #10
hugovk commentedThis patch isn't applying for me from composer.json against OpenID Connect 8.x-1.0-beta3 (released 21 June 2017):
When I try and apply it manually I get:
Was the latest patch against latest 8.x-1.0-beta3? Does it work against the latest one for others?
Thanks!
Comment #11
hugovk commentedBy the way, I implemented it differently, by creating a new plugin module which inherits from the provided Google plugin. The main code is in modules/openid_connect_newprovider/src/Plugin/OpenIDConnectClient/NewProvider.php:
With also a modules/openid_connect_myprovider/config/install/openid_connect.settings.myprovider.yml:
Comment #12
sanduhrsAlthough, there is duplicate code in there, it seems reasonable to apply for the time being.
Comment #13
sanduhrsCommitted, thanks.
Comment #17
jibranThis can return false and result in fatal.
Created #2940867: hook_openid_connect_pre_authorize can result in fatal for this.
Comment #18
figover commentedI am facing the issue.
when linkedin return to drupal.
The error is coming
The website encountered an unexpected error. Please try again later.
I checked in error log
TypeError: Argument 1 passed to openid_connect_extract_sub() must be of the type array, null given,