Giter Site home page Giter Site logo

Using beginner example: "Caused by: com.nimbusds.jose.proc.BadJOSEException: Signed JWT rejected: Another algorithm expected, or no matching key(s) found" about okta-jwt-verifier-java HOT 3 CLOSED

okta avatar okta commented on August 24, 2024
Using beginner example: "Caused by: com.nimbusds.jose.proc.BadJOSEException: Signed JWT rejected: Another algorithm expected, or no matching key(s) found"

from okta-jwt-verifier-java.

Comments (3)

kiplaaang avatar kiplaaang commented on August 24, 2024

So here's the problem I've found after debugging:
when I try decoding an id_token, it works no problem, and the key Id (kid) matches for the it token and the keys returned from https://dev-******.oktapreview.com/oauth2/v1/keys

However, when trying to decode the access token, the kids don't match. I'm not really sure why this is.

from okta-jwt-verifier-java.

kiplaaang avatar kiplaaang commented on August 24, 2024

Ignore everything I said! This issue can now be closed.

Basically what I found: I was using an Okta dev account, and setup a new application using OIDC, but was using the default authentication server. While the kid in an id_token would always match fine, it just never seemed to work using the access token's kid (and further note! using {site}.oktapreview.com as the root, vs {site}.oktapreview.com/oauth2/default would return different keys).

I finally created my own authentication server in Okta, and used that for everything instead, and now everything seems to work fine! Spent a full day trying to figure that out.

from okta-jwt-verifier-java.

bdemers avatar bdemers commented on August 24, 2024

@kiplaaang Thanks for following up!
This is related to #13, we will try to get a more descriptive error message when this happens

from okta-jwt-verifier-java.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.