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

Authorization throwing an exception: IDX10503 #500

Open
Ibrahimogod opened this issue May 4, 2024 · 3 comments
Open

Authorization throwing an exception: IDX10503 #500

Ibrahimogod opened this issue May 4, 2024 · 3 comments
Assignees
Labels

Comments

@Ibrahimogod
Copy link

Ibrahimogod commented May 4, 2024

Version, target platform, OS
10.1.1, unspecified, Windows/linux
Which package and what version, is it the latest?
11.0.0-beta2
What are the target platform and the OS?
unspecified target platform, os is windows and ubuntu (github workflows)

Exception message, stack trace

Bearer was not authenticated. Failure message: IDX10503: Signature validation failed. Token does not have a kid. Keys tried: '[PII of type 'System.Text.StringBuilder' is hidden. For more details, see
[https://aka.ms/IdentityModel/PII.]'.](https://aka.ms/IdentityModel/PII.]%27.)
Number of keys in TokenValidationParameters: '2'. Number of keys in Configuration: '2'. Exceptions caught: '[PII of type 'System.Text.StringBuilder' is hidden. For more details, see
[https://aka.ms/IdentityModel/PII.]'.](https://aka.ms/IdentityModel/PII.]%27.)
token: '[PII of type 'Microsoft.IdentityModel.JsonWebTokens.JsonWebToken' is hidden. For more details, see
[https://aka.ms/IdentityModel/PII.]'.](https://aka.ms/IdentityModel/PII.]%27.)
See
https://aka.ms/IDX10503
for details.

Description

After upgrading my projects (I'm using mono repo), I'm not able to use the generated access tokens to be authorized, basically authorization fails with the above error, I don't really understand what is happening, but after removing the package and using System.IdentityModel.Tokens.Jwt and start using it everything works fine!

How to reproduce

?

Additional context

m

@Ibrahimogod Ibrahimogod added the bug label May 4, 2024
@abatishchev abatishchev self-assigned this May 4, 2024
@abatishchev
Copy link
Member

Hi!

From which version to which version have you upgraded? And of which library, of Jwt.Net, any of its extension packages, or any other?

System.IdentityModel.Tokens.Jwt is a different package, it's owned by Microsoft, and is unrelated to this project. It's one of another, you don't need to use both.

The error indicates you're using the latter.

@abatishchev abatishchev changed the title Authorization throwin an exception issue Authorization throwing an exception: IDX10503 May 4, 2024
@Ibrahimogod
Copy link
Author

Hi!

From which version to which version have you upgraded? And of which library, of Jwt.Net, any of its extension packages, or any other?

System.IdentityModel.Tokens.Jwt is a different package, it's owned by Microsoft, and is unrelated to this project. It's one of another, you don't need to use both.

The error indicates you're using the latter.

I didn;t update JWT package itself, I updated other dependencies, from .net6 to .net8 supported versions, I tried to update "JWT" to from version "8.2.2" to version "10.1.1" but the same error appears

@abatishchev
Copy link
Member

Jwt doesn't depend or reference System.IdentityModel.Tokens.Jwt. I'm sorry, I don't see how it could be related to Jwt or how can I assist you on the error you're getting.

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

No branches or pull requests

2 participants