Skip to content

Snippet example is a dangerous implementation of JWT validation and should be modified to correctly validate the token and/or warn users to not use this exact logic #29604

@Ciarands

Description

@Ciarands

Existing documentation URL(s)

What changes are you suggesting?

The validateJWT function only checks the expiry of the token. The comment warning(s) are not sufficient for users who would be unaware of the potential danger of validating in this way. This should be clarified with a explicit warning that this is unsafe code, and/or offer a reference for a safe implementation of JWT validation.

Additional information

No response

Metadata

Metadata

Assignees

Labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions