-
Notifications
You must be signed in to change notification settings - Fork 26
Open
Description
Hey folks 👋🏼
I recently updated the package to 1.2.0
and looks like there's a bug that was introduced (link below)
https://github.com/nearform/fastify-auth0-verify/blob/master/index.js#L15C28-L15C28
My application sets the options.domain
property but it is being deleted which is causing an bad behaviour.
Ideally, you would create a copy of the options object and leave user options untouched.
Didn't send a PR since this is a single line change. Happy to send a PR if that helps
Proposal:
function fastifyAuth0Verify(instance, options, done) {
try {
const optionsCopy = { ...options };
let { domain, secret } = optionsCopy;
if (domain) {
delete optionsCopy.domain
}
...
}
Metadata
Metadata
Assignees
Labels
No labels