Next.js Discord

Discord Forum

Nextjs Auth0 - Can't find secret.

Unanswered
Giant panda posted this in #help-forum
Open in Discord
Giant pandaOP
I'm running a GitHub action to deploy app to a VPS, everything works fine except secrets. I can see them being output via echo, but Next.js isn't picking them up for Auth0. Anyone run into this issue?

code: 'ERR_LOGIN_HANDLER_FAILURE',
cause: TypeError: "secret" is required


My workflow:

name: deploy App

on:
  push:
    branches: [ "main" ]
  pull_request:
    branches: [ "main" ]

jobs:
  build:

    runs-on: self-hosted
    environment: dev
    strategy:
      matrix:
        node-version: [20.11]
    env:
      AUTH0_BASE_URL: ${{ secrets.AUTH0_BASE_URL }} 
      AUTH0_CLIENT_ID: ${{ secrets.AUTH0_CLIENT_ID }} 
      AUTH0_CLIENT_SECRET: ${{ secrets.AUTH0_CLIENT_SECRET }}
      AUTH0_ISSUER_BASE_URL: ${{ secrets.AUTH0_ISSUER_BASE_URL }}
      AUTH0_SECRET: ${{ secrets.AUTH0_SECRET }}
    steps:
    - uses: actions/checkout@v3
    - name: Use Node.js ${{ matrix.node-version }}
      uses: actions/setup-node@v3
      with:
        node-version: ${{ matrix.node-version }}
        cache: 'npm'
    - run: npm ci
    - run: npm run build --if-present
    - name: Change Directory
      run: cd [app directory - omitted]
    - run: pm2 restart 0

1 Reply

Boreal Chickadee
I'm having a similar issue now, did you find a solution?