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

Hydra OperationProcessingError: "response" is not a conform Authorization Server Metadata response #10924

Open
atliuhui opened this issue May 15, 2024 · 0 comments
Labels
bug Something isn't working triage Unseen or unconfirmed by a maintainer yet. Provide extra information in the meantime.

Comments

@atliuhui
Copy link

Environment

  System:
    OS: Windows 11 10.0.22631
    CPU: (16) x64 Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz
    Memory: 33.28 GB / 63.71 GB
  Binaries:
    Node: 20.12.2 - C:\Program Files\nodejs\node.EXE
    npm: 10.5.0 - C:\Program Files\nodejs\npm.CMD
  Browsers:
    Edge: Chromium (124.0.2478.105)
    Internet Explorer: 11.0.22621.1
  npmPackages:
    next: latest => 14.2.3
    next-auth: beta => 5.0.0-beta.17
    react: ^18.2.0 => 18.3.1

Reproduction URL

https://github.com/atliuhui/debug-nextauth-hydra

Describe the issue

[auth][warn][debug-enabled] Read more: https://warnings.authjs.dev#debug-enabled
 GET /auth/signin?callbackUrl=http%3A%2F%2Flocalhost%3A3000%2F 200 in 1605ms
[auth][error] OperationProcessingError: "response" is not a conform Authorization Server Metadata response
    at Module.processDiscoveryResponse (webpack-internal:///(rsc)/./node_modules/oauth4webapi/build/index.js:287:15)
    at getAuthorizationUrl (webpack-internal:///(rsc)/./node_modules/@auth/core/lib/actions/signin/authorization-url.js:25:68)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async Module.signIn (webpack-internal:///(rsc)/./node_modules/@auth/core/lib/actions/signin/index.js:16:56)
    at async AuthInternal (webpack-internal:///(rsc)/./node_modules/@auth/core/lib/index.js:72:24)
    at async Auth (webpack-internal:///(rsc)/./node_modules/@auth/core/index.js:126:34)
    ......
 POST /auth/signin/hydra 302 in 45ms
 GET /auth/error?error=Configuration 500 in 21ms

How to reproduce

.env.local

AUTH_SECRET=xxx
AUTH_ORY_HYDRA_ISSUER=http://localhost:4444/.well-known/openid-configuration
AUTH_ORY_HYDRA_CLIENT_ID=xxx
AUTH_ORY_HYDRA_CLIENT_SECRET=xxx

[GET] http://localhost:4445/admin/clients/xxx

{
	"client_id": "xxx",
	"client_name": "Portal",
	"redirect_uris": [
		"http://localhost:3000/api/auth/callback/hydra"
	],
	"grant_types": [
		"authorization_code",
		"client_credentials"
	],
	"response_types": [
		"code",
		"token",
		"id_token"
	],
	"scope": "offline_access offline openid",
	"audience": [],
	"owner": "",
	"policy_uri": "",
	"allowed_cors_origins": [],
	"tos_uri": "",
	"client_uri": "",
	"logo_uri": "",
	"contacts": [],
	"client_secret_expires_at": 0,
	"subject_type": "public",
	"jwks": {},
	"token_endpoint_auth_method": "client_secret_post",
	"userinfo_signed_response_alg": "none",
	"created_at": "2024-05-11T06:00:44Z",
	"updated_at": "2024-05-15T18:59:59.820121Z",
	"metadata": {},
	"skip_consent": false,
	"skip_logout_consent": null,
	"authorization_code_grant_access_token_lifespan": null,
	"authorization_code_grant_id_token_lifespan": null,
	"authorization_code_grant_refresh_token_lifespan": null,
	"client_credentials_grant_access_token_lifespan": null,
	"implicit_grant_access_token_lifespan": null,
	"implicit_grant_id_token_lifespan": null,
	"jwt_bearer_grant_access_token_lifespan": null,
	"refresh_token_grant_id_token_lifespan": null,
	"refresh_token_grant_access_token_lifespan": null,
	"refresh_token_grant_refresh_token_lifespan": null
}

Expected behavior

should get hydra's token

@atliuhui atliuhui added bug Something isn't working triage Unseen or unconfirmed by a maintainer yet. Provide extra information in the meantime. labels May 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working triage Unseen or unconfirmed by a maintainer yet. Provide extra information in the meantime.
Projects
None yet
Development

No branches or pull requests

1 participant