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

When using a docker container on azure, Azure AD throws a error "response" is not a conform Authorization Server Metadata response #8072

Closed
derekhearst opened this issue Jul 17, 2023 · 1 comment
Labels
question Ask how to do something or how something works

Comments

@derekhearst
Copy link

Question 💬

2023-07-17T17:22:22.512544913Z �[31m[auth][error][SignInError]�[0m: Read more at https://errors.authjs.dev#signinerror 2023-07-17T17:22:22.512815527Z �[31m[auth][cause]�[0m: OperationProcessingError: "response" is not a conform Authorization Server Metadata response 2023-07-17T17:22:22.512834628Z at Module.processDiscoveryResponse (file:///usr/src/app/node_modules/.pnpm/oauth4webapi@2.3.0/node_modules/oauth4webapi/build/index.js:215:15) 2023-07-17T17:22:22.512841028Z at getAuthorizationUrl (file:///usr/src/app/node_modules/.pnpm/@auth+core@0.9.0/node_modules/@auth/core/lib/oauth/authorization-url.js:19:28) 2023-07-17T17:22:22.512845728Z at process.processTicksAndRejections (node:internal/process/task_queues:95:5) 2023-07-17T17:22:22.512850329Z at async Module.signin (file:///usr/src/app/node_modules/.pnpm/@auth+core@0.9.0/node_modules/@auth/core/lib/routes/signin.js:14:20) 2023-07-17T17:22:22.512858029Z at async AuthInternal (file:///usr/src/app/node_modules/.pnpm/@auth+core@0.9.0/node_modules/@auth/core/lib/index.js:112:36) 2023-07-17T17:22:22.512863129Z at async Auth (file:///usr/src/app/node_modules/.pnpm/@auth+core@0.9.0/node_modules/@auth/core/index.js:100:30) 2023-07-17T17:22:22.512867630Z at async respond (file:///usr/src/app/build/server/chunks/index-7503f5c5.js:3307:22) 2023-07-17T17:22:22.512872230Z at async Array.ssr (file:///usr/src/app/build/handler.js:1221:3) 2023-07-17T17:22:22.512876730Z �[31m[auth][details]�[0m: { 2023-07-17T17:22:22.512881130Z "provider": "azure-ad" 2023-07-17T17:22:22.512885730Z }

This is the error that gets thrown, this error doesn't get thrown in other environments ( locally run in dev, locally run in docker, & in a azure app service ). It only gets thrown when in azure.

I've changed NEXTAUTH_URL to the publicly exposed url, and the NEXTAUTH__URL_INTERNAL to localhost:3000, however this didn't fix the issue.

#6949 - this is one of the resources I've seen on the subject, but I'm using SvelteKit with the AuthJS core library instead of nextauth.

How to reproduce ☕️

Throw a Sveltekit project with authjs and an azure-ad adapter into a docker container. Then publish to azure ad.

Contributing 🙌🏽

Yes, I am willing to help answer this question in a PR

@derekhearst derekhearst added the question Ask how to do something or how something works label Jul 17, 2023
@derekhearst
Copy link
Author

This was an issue with environment variables not being passed through correctly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Ask how to do something or how something works
Projects
None yet
Development

No branches or pull requests

1 participant