Skip to content

13.0.0 - Firebase Credential -The incoming JSON object does not contain a client_email field #2778

Closed
@mustafa-barakat

Description

@mustafa-barakat

Describe your environment

  • Operating System version: Docker on Windows
  • Firebase SDK version: 13.0.0
  • Firebase Product: Firebase Admin
  • Node.js version: 18+
  • NPM version: 10.9

Steps to reproduce:

  • Upgrade to firebase admin to 13.0.0
  • When using initializeApp with credential and adding (projectId,clientEmail,privateKey)

This doesn't happen in previous versions

Error
message: 'Credential implementation provided to initializeApp() via the "credential" property failed to fetch a valid Google OAuth2 access token with the following error: "The incoming JSON object does not contain a client_email field"

Relevant Code:

import { initializeApp } from 'firebase-admin/app';
import { credential } from 'firebase-admin';

initializeApp({
      credential: credential.cert({
        projectId: 'PROJECTID',
        clientEmail:
          'EMAIL,
        privateKey:
          'PRIVKEY',
      }),
    });

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