Skip to content

Can not decode EXP token, is there a way? #536

Closed
@russmenum

Description

@russmenum

I have a case where I need to read the body of an EXP token

$decoded = JWT::decode($todecode, Security::salt(), array_keys(JWT::$supported_algs));

this works when the token is active, but after it expires it creates a server-side error

Error: [Firebase\JWT\ExpiredException] Expired token (...files/vendor/firebase/php-jwt/src/JWT.php:158)

Is there a way to still get the result of the decode in spite of the error for an old expired token? I just need to be able to read the contents not use it for validation.

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions