Skip to content

accept invalid tokens when firebase emulator env variable is set#34

Merged
trchopan merged 1 commit intotrchopan:mainfrom
gionapaolini:main
Feb 11, 2025
Merged

accept invalid tokens when firebase emulator env variable is set#34
trchopan merged 1 commit intotrchopan:mainfrom
gionapaolini:main

Conversation

@gionapaolini
Copy link
Contributor

https://firebase.google.com/docs/emulator-suite/connect_auth#admin_sdks

The official SDK from firebase implements a check for when an env variable "FIREBASE_AUTH_EMULATOR_HOST" is set, in which case the signature verification is skipped and it just decodes the payload. This is useful for testing purposes when using the firebase emulator, since it does not sign the tokens for security reasons.

I think it would be useful to align with the official SDKs and implement the same.

@trchopan
Copy link
Owner

@gionapaolini Hi. Thanks alot for the PR. I will merge and make this available in the next release. 🙇

@trchopan trchopan merged commit e6d054f into trchopan:main Feb 11, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants