ReallySimpleJWT icon indicating copy to clipboard operation
ReallySimpleJWT copied to clipboard

Error decoding payload with accents

Open ericx0099 opened this issue 1 year ago • 3 comments

If any property of the payload is a string with accents this function ( Token::validate($token, $secret);) returns false without entering in any catch clause. Example: "name": "Gerard Hernàndez",

ericx0099 avatar Jul 24 '24 11:07 ericx0099

If any property of the payload is a string with accents this function ( Token::validate($token, $secret);) returns false without entering in any catch clause. Example: "name": "Gerard Hernàndez",

Hi Eric. Could you solve it in any way?

kabeza avatar Jun 05 '25 15:06 kabeza

If any property of the payload is a string with accents this function ( Token::validate($token, $secret);) returns false without entering in any catch clause. Example: "name": "Gerard Hernàndez",

Hi Eric. Could you solve it in any way?

Yes, i encoded with base64 the full payload, and the result of the base64 is what i encrypt/decrypt with jwt.

ericx0099 avatar Oct 07 '25 11:10 ericx0099

If any property of the payload is a string with accents this function ( Token::validate($token, $secret);) returns false without entering in any catch clause. Example: "name": "Gerard Hernàndez",

Hi Eric. Could you solve it in any way?

Yes, i encoded with base64 the full payload, and the result of the base64 is what i encrypt/decrypt with jwt.

Thanks for the tip

kabeza avatar Oct 07 '25 11:10 kabeza