I need to associate sub, which is received as part of $userinfo in openid_connect_save_userinfo, but I don't see it as part of the claim options. I also don't see that it's stored elsewhere.

I am using the openid_connect project.

I'm wondering if I'm missing something in configuration and maybe I need to do something custom.


The association is stored in openid_connect_authmap and there is a service: openid_connect.authmap to access it.

Without DI: \Drupal::service('openid_connect.authmap') ->getConnectedAccounts(\Drupal::entityTypeManager()->getStorage('user')->load($userid))

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.