Closed alxpereira closed 9 months ago
Likely a configuration issue. Check none of your env variables are incorrect or coming as empty and that you've provided all the none optional data. Additionally, check your client configuration in auth0.
@alxpereira
You have the following config (issuer and wellKnown using different env vars for domain)
issuer: process.env.AUTH0_BASEURL,
wellKnown: `https://${process.env.AUTH0_DOMAIN}/.well-known/openid-configuration`
However within the auth0 provider well known is specified like this:
wellKnown: ${options.issuer}/.well-known/openid-configuration
Maybe just try specifying just the issuer and copy the example provided by auth0 exactly.
Thanks, I found the issue, indeed the issuer / wellKnow settings were in collision, the documentation was unclear.
For the record, here is my final (working) setting :
export const authOptions: AuthConfig = {
secret: runtimeConfig.authJs.secret,
theme: {
logo: "https://nuxt.com/assets/design-kit/logo/icon-green.png",
},
providers: [
Auth0Provider({
clientId: process.env.AUTH0_CLIENT_ID,
clientSecret: process.env.AUTH0_SECRET,
issuer: `https://${process.env.AUTH0_DOMAIN}`,
authorization: {
url: `https://${process.env.AUTH0_DOMAIN}/authorize`,
params: { scope: "openid profile email" },
},
}),
],
};
Environment
Darwin
v21.1.0
3.9.3
3.10.0
2.8.1
yarn@1.22.21
-
devtools
,modules
,gtag
,routeRules
,app
,alias
,runtimeConfig
@element-plus/nuxt@1.0.7
,@nuxtjs/i18n@8.0.0
,nuxt-gtag@1.1.2
,@hebilicious/authjs-nuxt@0.3.5
-
Reproduction
Nuxt3 setup with authjs nuxt plugin.
auth/[...].ts setup as below
Describe the bug
The login page is starting properly, but got this error on callback. It tried to test a lot of possible configurations in the Provider setup, but nothing goes properly.
OperationProcessingError: "response" is not a conform Authorization Server Metadata response
Any idea ?
Additional context
No response
Logs
No response