palixir / wabe

Your backend in minutes not days for Node.js / Bun
https://wabe.dev
Apache License 2.0
137 stars 8 forks source link

Need to add a param in config to hide sensitive error #74

Open coratgerl opened 1 week ago

coratgerl commented 1 week ago

Is your feature request related to a problem? Please describe.

We need to hide sensitive error message like user not found in production but not in dev to keep a clear message when we encountered an error.

Describe the solution you'd like

A param in config inside a new object name "security".

...
security : {
  hideSensitiveError: boolean
}

Then we need to find all sensitive errors in codebase, mainly in EmailPassword, SignIn and SignUp and put a generic message if this param is to true.

AdditionalContext

Need to add a documentation about this new params :)