Skip to content

Bun v1.2.6 doesn't support JsonWebToken (jsonwebtoken package) #13682

Closed
@exKAZUu

Description

@exKAZUu

What version of Bun is running?

1.2.6+8ebd5d53d

What platform is your computer?

Darwin 23.6.0 arm64 arm

What steps can reproduce the bug?

I created a reporduction repo with reporduction steps: https://github.com/exKAZUu/bun-supertokens-issue

What is the expected behavior?

No errors occur same with node main.mjs on https://github.com/exKAZUu/bun-supertokens-issue.

What do you see instead?

bun main.mjs on https://github.com/exKAZUu/bun-supertokens-issue shows the following error:

JsonWebTokenError: error in secret or public key callback: The JWKS endpoint did not contain any signing keys

Additional information

The above code uses jsonwebtoken, jwks-rsa, and supertokens-node, but I believe the combination of jsonwebtoken and Bun causes the above error. I suspect that Bun's JSON parser is broken.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions