Skip to content
This repository was archived by the owner on Oct 17, 2024. It is now read-only.
This repository was archived by the owner on Oct 17, 2024. It is now read-only.

Not working with firebase 10 #525

@RoyBkker

Description

@RoyBkker

When updating to firebase 10, I receive errors that initializing is not working anymore.

import { FirebaseAdminModule } from '@aginix/nestjs-firebase-admin';
import { Module } from '@nestjs/common';
import { join } from 'path';
import { cert } from 'firebase-admin/app';

// eslint-disable-next-line @typescript-eslint/no-var-requires
const serviceAccount = require(join(
  __dirname,
  `config/firebase-admin-${process.env.FIREBASE_ENV}.json`,
));

console.log(serviceAccount);

@Module({
  imports: [
    FirebaseAdminModule.forRootAsync({
      useFactory: () => ({
        credential: cert(serviceAccount),
      }),
    }),
  ],
})
export class FirebaseModule {}

ERROR
Failed to determine project ID for Auth. Initialize the SDK with service account credentials or set project ID as an app option.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions