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

AUTH0_AUDIENCE not set in .env.local. Shutting down API server. #172

Open
4 tasks done
bennycode opened this issue Jul 16, 2024 · 2 comments
Open
4 tasks done

AUTH0_AUDIENCE not set in .env.local. Shutting down API server. #172

bennycode opened this issue Jul 16, 2024 · 2 comments

Comments

@bennycode
Copy link

Checklist

  • I have looked into the Readme and have not found a suitable solution or answer.
  • I have searched the issues and have not found a suitable solution or answer.
  • I have searched the Auth0 Community forums and have not found a suitable solution or answer.
  • I agree to the terms within the Auth0 Code of Conduct.

Description

I am new to Auth0 and followed the quickstart (https://manage.auth0.com/dashboard/eu/auth-sp-staging/applications/.../quickstart).

It describes how to "Configure the SDK" but has no instructions on what to set AUTH0_AUDIENCE to. When AUTH0_AUDIENCE is not set, the api-server.js script will terminate the program:

if (!audience) {
  console.log('AUTH0_AUDIENCE not set in .env.local. Shutting down API server.');
  process.exit(1);
}

Reproduction

  1. Clone auth0-nextjs-sample@0.1.0
  2. Run npm install
  3. Run npm run dev

Additional context

nextjs-auth0 version

3.5.0

Next.js version

13.5.1

Node.js version

20.10.0

@tyfrth
Copy link

tyfrth commented Sep 11, 2024

Hey there @bennycode the audience is the API identifier for an API you register in Auth0 - For more on the audience param see this community topic. Here's an example using the SDK:
https://github.com/auth0/nextjs-auth0/blob/main/EXAMPLES.md#access-an-external-api-from-an-api-route

@readikus
Copy link

Hey there @bennycode the audience is the API identifier for an API you register in Auth0 - For more on the audience param see this community topic. Here's an example using the SDK: https://github.com/auth0/nextjs-auth0/blob/main/EXAMPLES.md#access-an-external-api-from-an-api-route

The developer experience getting started with Auth0 leaves a lot to be desired. It seems mind blowing that a commercial product that employs developers has "getting started" guides that require the user to hunt around debugging how to get the tool working.

As a tool that's meant to speed up development by "solving" auth, you're not doing a very good job of it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants