i am trying to use nextjs sdk and have configured an regular web app in auth0 using local host, but after login getting the below mentioned error - “The client_secret or client_assertion field is required, or it should be mTLS request” let me know if i am missing something on this .
Hi @manors,
The error indicates that your Next.js application, acting as a confidential client, is failing to provide the required Client Secret to Auth0 when exchanging the authorization code for tokens. This is caused by a missing or incorrectly loaded environment variable. Ensure the AUTH0_CLIENT_SECRET is correctly configured in your Next.js environment.
If you have any further questions, please don’t hesitate to reach out.
Have a good one,
Vlad
hi murarasu,
Thanks for your reply, i have followed the link from auth0 quick starts guide to install next.js sdk and i have configured regular web application in auth0 tenant and utilised the same client id and secret in the sdk configuration as well,
not sure what i am missing could you please help on this.
AUTH0_DOMAIN=
AUTH0_CLIENT_ID=
AUTH0_CLIENT_SECRET=
AUTH0_SECRET=Om1PHDQq2MSGYWp7rBluFzhs5tVvNnf8Tyi40gIbw96jxJUEcCLeoARXKZa3kd
APP_BASE_URL=
we have configured all this values from .env.local file
Hi @manors,
You have to input all your variables into the .env.local file, not just the AUTH0_SECRET.
https://auth0.com/docs/quickstart/webapp/nextjs#dashboard
You need to provide your application’s domain, client ID, and client secret for the application to function correctly.
Have a good one,
Vlad