Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Illegal base64url string! Parameter name: input #213

Open
RushabhJbspl opened this issue Jan 3, 2023 · 1 comment
Open

Illegal base64url string! Parameter name: input #213

RushabhJbspl opened this issue Jan 3, 2023 · 1 comment

Comments

@RushabhJbspl
Copy link

Hello,
I am facing "Illegal base64url string! Parameter name: input" error while decoding the token :
System.ArgumentOutOfRangeException
HResult=0x80131502
Message=Illegal base64url string!
Parameter name: input
Source=jose-jwt
StackTrace:
at Jose.Base64Url.Decode(String input)
at Jose.JWT.DecodeBytes(String token, Object key, Nullable1 expectedJwsAlg, Nullable1 expectedJweAlg, Nullable`1 expectedJweEnc, JwtSettings settings, Byte[] payload)
at Jose.JWT.Decode(String token, Object key, JwsAlgorithm alg, JwtSettings settings, String payload)

App Code:
byte[] secretKey = Encoding.ASCII.GetBytes(Key);
string Response = IsEncrypt ? JWT.Encode(Message, secretKey, JwsAlgorithm.HS256) : JWT.Decode(Message, secretKey, JwsAlgorithm.HS256);

@dvsekhvalnov
Copy link
Owner

Hi @RushabhJbspl ,

mind posting token?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants