Skip to content

Firebase Emulator doesn't sign idToken, trips web-auth-library up #27

Open
@CmdrDats

Description

@CmdrDats

I'm using the Firebase Authentication Emulator, and kept getting this error locally from my CloudFlare Worker:

[FetchError: Public key "undefined" not found.]

After digging through the code a while and manually using jose to decode the idToken header (where the "undefined" comes from), I discovered that there is no kid on the locally generated idToken - more info here firebase/firebase-tools#2764

I could workaround this by using jose directly when in emulator mode, but it would be ideal if I could provide an 'emulator' flag in the options and the library would simply skip the signing check? A note about the emulator in the readme would also help future users.

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