Skip to content
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

Multi-Tenancy Documentation is Incorrect #233

Open
Californian opened this issue Jul 4, 2020 · 1 comment
Open

Multi-Tenancy Documentation is Incorrect #233

Californian opened this issue Jul 4, 2020 · 1 comment

Comments

@Californian
Copy link

Description

The section at https://github.com/auth0/express-jwt#multi-tenancy describes the function signature of the (poorly-named, in the case of RSA-256 verification) "secret" function signature as req, payload, done, but, in usage, I found the signature to actually be req, header, payload, callback. I didn't dig into the code too much, so I'm not sure what that arity check is actually doing, but this seems to be the default behavior when I used it so it would be good to at least call this out as a possibility.

Reproduction

You should just have to follow the documentation; I don't think I appreciably deviated from it.

Environment

Latest versions of all of express-jwt, jwks-rsa, etc (tried updating them all as a first fix attempt).
I'm using an RSA-256 keypair.

@HyperCharlie
Copy link

Interestingly the typescript types have a SecretCallback, which matches the documentation, and a SecretCallbackLong, which has the header in it. It's setup as a union type, which makes no sense because the two functions would conflict.

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

No branches or pull requests

2 participants