-
Notifications
You must be signed in to change notification settings - Fork 219
Give secret params a .value() method
#1281
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Can we add a changelog? I think this is a bugfix. |
|
Thanks, I added a changelog! A couple of questions:
|
…base-functions into jhuleatt-secretparam-value
Berlioz
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Other than one nit, LGTM.
src/params/types.ts
Outdated
| runtimeValue(): string { | ||
| return process.env[this.name] || ""; | ||
| const val = process.env[this.name]; | ||
| if (!val) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
couldn't someone deliberately set a secret to the empty string, which is falsy?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changed from a falsy check to val === undefined
|
LGTM |
Description
Fixes #1264
Code sample
https://firebase.google.com/docs/functions/config-env#secret_parameters