Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
See https://www.drupal.org/node/2559543. It seems like it is about to be merged so I will just do a port.
Comment | File | Size | Author |
---|---|---|---|
#12 | add_pre_login_hook-2867260-12.patch | 2.14 KB | sanduhrs |
#8 | openid_connect-2867260-pre-login-hook-8.patch | 3.08 KB | yannickoo |
#7 | pre-login-hook-2867260-7.patch | 2.13 KB | harora |
#6 | interdiff.txt | 1.03 KB | yannickoo |
#6 | openid_connect-2867260-pre-login-hook-6.patch | 3.58 KB | yannickoo |
Comments
Comment #2
mikejw CreditAttribution: mikejw at University of Adelaide commentedAnd here is the patch.
Comment #3
mikejw CreditAttribution: mikejw at University of Adelaide commentedComment #4
mikejw CreditAttribution: mikejw at University of Adelaide 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
$sub
inopenid_connect_connect_current_user
which results inComment #7
harora CreditAttribution: harora at University of Adelaide 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
$sub
variable which I noticed in #6.Comment #9
hugovk CreditAttribution: hugovk at Digia commentedComment #10
hugovk CreditAttribution: hugovk at Digia 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 CreditAttribution: hugovk at Digia 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 CreditAttribution: 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,