Envelop is a lightweight library allowing developers to easily develop, share, collaborate and extend their GraphQL execution layer. Envelop is the missing GraphQL plugin system.
Please install the latest @envelop/* packages that you are using.
Please make sure the reproduction is as small as possible.
[ ] 2. A failing test has been provided
[ ] 3. A local solution has been provided
[X] 4. A pull request is pending review
Describe the bug
The Auth0 plugin only accepts a single audience when the underlying jsonwebtoken library also accepts (among others) an array of string and actually internally creates an array from a single audience if provided.
Issue workflow progress
Progress of the issue based on the Contributor Workflow
@envelop/*
packages that you are using.Describe the bug
The Auth0 plugin only accepts a single audience when the underlying jsonwebtoken library also accepts (among others) an array of string and actually internally creates an array from a single audience if provided.
To Reproduce
No reproduction.
See jsonwebtoken project for how the property is handled to see that it can in fact receive an array: https://github.com/auth0/node-jsonwebtoken/blob/bc28861f1fa981ed9c009e29c044a19760a0b128/verify.js#L195
Compare to the envelop auth0 plugin: https://github.com/n1ru4l/envelop/blob/eafae3bf93a19f2e41efcadcc1c42fb99ba08b52/packages/plugins/auth0/src/index.ts#L12
Expected behavior
Allow passing an array of strings to the function. Preferably whatever the jsonwebtoken types indicate, which is currently: https://github.com/DefinitelyTyped/DefinitelyTyped/blob/518b9ae4a518c621700a97be30ee128b66a5da78/types/jsonwebtoken/index.d.ts#L60
Environment:
@envelop/*
versions:@envelop/core
:5.0.0
@envelop/auth0
:6.0.0
Additional context
NA