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

bug: no applicable key found in the JSON Web Key Set #5186

Closed
cong5 opened this issue Jan 2, 2024 · 8 comments
Closed

bug: no applicable key found in the JSON Web Key Set #5186

cong5 opened this issue Jan 2, 2024 · 8 comments
Assignees
Labels
pending-verification Something is still under investigation

Comments

@cong5
Copy link

cong5 commented Jan 2, 2024

Hello!

I ran logto in kubernetes using the docker image: svhd/logto:latest, but when I tried to log into the console, an error occurred and I was unable to log in.

Oops! Something went wrong.
f: no applicable key found in the JSON Web Key Set
at c.getKey (https://xxxx.shop/console/index.b0698af2.js:3:29786)
at https://xxxx.shop/console/index.b0698af2.js:3:30333
at #c (https://xxxx.shop/console/index.b0698af2.js:3:44747)
at o.getKey (https://xxxx.shop/console/index.b0698af2.js:3:44304)
at async u (https://xxxx.shop/console/index.b0698af2.js:3:16240)
at async a (https://xxxx.shop/console/index.b0698af2.js:3:14004)
at async a (https://xxxx.shop/console/index.b0698af2.js:3:18868)
at async l (https://xxxx.shop/console/index.b0698af2.js:3:40765)
at async c.verifyIdToken (https://xxxx.shop/console/index.b0698af2.js:1:532057)
at async c.handleSignInCallback (https://xxxx.shop/console/index.b0698af2.js:1:530082)

@cong5 cong5 added the bug Something isn't working label Jan 2, 2024
@cong5 cong5 closed this as completed Jan 2, 2024
@cong5
Copy link
Author

cong5 commented Jan 3, 2024

Console backend login no longer reports an error, but the return value from Machine-to-Machine application requesting Machine-to-Machine is:

{
    "message": "未经授权。请检查凭据及其范围。",
    "code": "auth.unauthorized",
    "data": {
        "code": "ERR_JWKS_NO_MATCHING_KEY",
        "name": "JWKSNoMatchingKey",
        "message": "no applicable key found in the JSON Web Key Set"
    }
}

@cong5 cong5 reopened this Jan 3, 2024
@darcyYe
Copy link
Contributor

darcyYe commented Jan 3, 2024

Hi @cong5 , could you please elaborate on your setup and how you make M2M requests?

@darcyYe darcyYe added pending-verification Something is still under investigation and removed bug Something isn't working labels Jan 3, 2024
@cong5
Copy link
Author

cong5 commented Jan 3, 2024

Hi @cong5 , could you please elaborate on your setup and how you make M2M requests?

first request https://xxx.shop/oidc/token get access_token:
image

second request any Logto Management API response this error.

image

@darcyYe
Copy link
Contributor

darcyYe commented Jan 3, 2024

Are you using a self-hosted OSS version? or you are using Logto Cloud.

@cong5
Copy link
Author

cong5 commented Jan 4, 2024

Are you using a self-hosted OSS version? or you are using Logto Cloud.
using a self-hosted version

@darcyYe
Copy link
Contributor

darcyYe commented Jan 4, 2024

Did you or someone with access to your Logto localhost change the oidc.privateKeys after the instance started but before you requested the Logto management API?

@darcyYe
Copy link
Contributor

darcyYe commented Jan 4, 2024

I can not reproduce your issue on my machine. I started a brand new OSS Logto instance with a new DB, created a m2m app, can hence successfully get the access token and access the management API. It could be helpful if you can provide a step by step guide to reproduce this issue.

@darcyYe
Copy link
Contributor

darcyYe commented Jan 4, 2024

You can also check whether you have assigned the scope all to the M2M app via an m2m role.

@darcyYe darcyYe self-assigned this Jan 4, 2024
@cong5 cong5 closed this as completed Jan 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pending-verification Something is still under investigation
Development

No branches or pull requests

2 participants