The change made during this issue on 3.x is causing issues when calling getUserInfo() during an onUserLogin event.
https://www.drupal.org/project/social_auth_google/issues/3133754
https://www.drupal.org/commitlog/commit/88083/5fba18b753b85e5941db5d05dc...
When you call getUserInfo during a onUserLogin event and use the following code to retrieve user details:
$plugin_manager = $this->googleAuthManager;
$response = $plugin_manager->getUserInfo()->toArray();Both $this->user and $this->getAccessToken() are both populated, which means
$this->loggerFactory->get('social_auth_google')
->error('There was an error fetching the access token for user.');Is called when $this->user is already populated, leading to my errors logs getting filled up a lot when there's no error here.
Patch to come. I've noticed this is already handled in the 4.x module:
https://git.drupalcode.org/project/social_auth_google/-/blob/4.0.x/src/G...
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | getuserinfo-broken-onuserlogin-event-3341882-2.patch | 1001 bytes | thomwilhelm |
Comments
Comment #2
thomwilhelm commentedComment #3
thomwilhelm commentedComment #4
thomwilhelm commentedComment #5
thomwilhelm commented