FirstName and LastName field are not being used in 4.x branch

Created on 22 June 2023, over 1 year ago
Updated 26 June 2023, over 1 year ago

Problem/Motivation

In Social Auth Google 3.x branch, GoogleAuthManager::getUserInfo() used to return League\OAuth2\Client\Provider\GoogleUser type user object. Ref: https://git.drupalcode.org/project/social_auth_google/-/blob/3.x/src/Goo...

On accessing getFirstName() and getLastName() from that user object, it used to return the required values from league/oauth2-google library, which we were using in our project for validations in SocialAuthEvents::USER_FIELDS event.

In 4.x version facing issue here, as in 4.x, instead of the user object from league/oauth2-google library, GoogleAuthManager::getUserInfo() now returns a user object of type Drupal\social_auth\User\SocialAuthUser. Ref: https://git.drupalcode.org/project/social_auth_google/-/blob/4.0.x/src/G...

The firstname and lastname fields become null since its not being set with any values.

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

🐛 Bug report
Status

Fixed

Version

4.0

Component

Code

Created by

🇮🇳India Supreetam09 Kolkata

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024