The schema was joined with a Untion from typebox which means either the schema is valid or the optional properties of the jwt payload.
This is not right since validating a invalid token will come out as valid since it matches with the other union of all optional parameters of the jwt payload.
The schema was joined with a Untion from typebox which means
either
the schema is validor
the optional properties of the jwt payload.This is not right since validating a invalid token will come out as valid since it matches with the other union of all optional parameters of the jwt payload.
For example giving following
use
call......a token with the following payload would pass as
valid
:A Intersect should be used (like implemented in this PR) which means the schema needs to valid
and
the optional properties