Skip to content

V9 Auth additionalUserInfo missing from login results #5257

@daveteu

Description

@daveteu

[REQUIRED] Describe your environment

  • Operating System version: macos
  • Browser version: chrome
  • Firebase SDK version: 9.0.0-beta.6
  • Firebase Product: auth

[REQUIRED] Describe the problem

The code below used to return user. additionalUserInfo, but now it's replaced with _tokenResponse.

This information contains additionalUserInfo.isNewUser which identifys new user registration. The information is now inside _tokenReponse, while user.additionalUserInfo is now undefined.

Is this permanent change or bug? I cannot find documentation on this.

image

Relevant Code:


const auth = getAuth(firebase);

const async loginGoogleCredentials (tokenId) => {
  const credential = GoogleAuthProvider.credential(tokenId)
  return await signInWithCredential(auth, credential).catch(function(error) {
    return(error)
};
// TODO(you): code here to reproduce the problem

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions