Skip to content

TypeError: e.auth.addAuthTokenListener is not a function #5036

@ilmatic

Description

@ilmatic
  • Operating System version: macOS 11.3.1
  • Browser version: Chrome 91.0.4472.106
  • Firebase SDK version: 9.0.0-beta.4
  • Firebase Product: firestore

[REQUIRED] Describe the problem

Initialization fails with the error. TypeError: e.auth.addAuthTokenListener is not a function

I am working on a Chrome extension service worker, so I have to use the v9 beta, as that seems to be the only version where Fetch is implemented.

Steps to reproduce:

Install [email protected]. import and initialize firestore.

import { initializeApp } from "firebase/app";
import { initializeAuth, indexedDBLocalPersistence } from "firebase/auth";
import { DocumentSnapshot, initializeFirestore } from "firebase/firestore";

const firebaseConfig = {/* config here */};

export const app = initializeApp(firebaseConfig);
export const auth = initializeAuth(app, {
	persistence: indexedDBLocalPersistence,
});
export const firestore = initializeFirestore(app, {});

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions