simple-oauth2
simple-oauth2 copied to clipboard
Obfuscate secret in Joi validation errors
Context
- 18
- ^5.1.0
- Node
What problem are you trying to solve?
When providing an invalid config to one of the constructors, in our case AuthorizationCode, we receive a helpful Joi ValidationError. The problem, though, is that this error includes the provided config, which includes the secret, which gets logged to stdout and picked up by logging services.
Do you have a new or modified API suggestion to solve the problem?
I'd suggested replacing the logged secret with [REDACTED].