{
  "name": "Validate Auth0 JWT tokens using JWKS or signing cert",
  "nodes": [
    {
      "id": "2939d06d-d135-4ab4-9ec0-e4864b798df3",
      "name": "Webhook",
      "type": "n8n-nodes-base.webhook",
      "position": [
        -100,
        640
      ]
    },
    {
      "id": "0c25066d-57eb-4511-94d8-77914f7377ef",
      "name": "Using JWK-RSA",
      "type": "n8n-nodes-base.code",
      "position": [
        120,
        120
      ]
    },
    {
      "id": "267a3136-cbf1-4567-b203-863bdbc736f5",
      "name": "401 Unauthorized",
      "type": "n8n-nodes-base.respondToWebhook",
      "position": [
        400,
        220
      ]
    },
    {
      "id": "d191045f-0897-46d3-8262-10f14c35d924",
      "name": "Using Public Cert",
      "type": "n8n-nodes-base.code",
      "position": [
        120,
        640
      ]
    },
    {
      "id": "81ed6596-dc8e-4e0c-8de3-e73ad9c4b3c3",
      "name": "401 Unauthorized1",
      "type": "n8n-nodes-base.respondToWebhook",
      "position": [
        400,
        740
      ]
    },
    {
      "id": "6725156d-8d92-4bf6-a0a4-985173d60155",
      "name": "Webhook1",
      "type": "n8n-nodes-base.webhook",
      "position": [
        -100,
        120
      ]
    },
    {
      "id": "cbbdae78-6827-43df-a5bc-44a4039eb95e",
      "name": "Continue with Request",
      "type": "n8n-nodes-base.noOp",
      "position": [
        400,
        20
      ]
    },
    {
      "id": "1624c7d1-1dc7-4ee9-bae6-b13cd67bbdf6",
      "name": "Continue with Request1",
      "type": "n8n-nodes-base.noOp",
      "position": [
        400,
        540
      ]
    },
    {
      "id": "93e19396-3126-4657-a190-95aa65dd6a60",
      "name": "200 OK",
      "type": "n8n-nodes-base.respondToWebhook",
      "position": [
        620,
        20
      ]
    },
    {
      "id": "f819e2d8-8718-43d1-b0b6-b668bb74013c",
      "name": "200 OK1",
      "type": "n8n-nodes-base.respondToWebhook",
      "position": [
        620,
        540
      ]
    },
    {
      "id": "11efede9-4f16-4d90-85ab-facbda2d97c4",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -320,
        -160
      ],
      "parameters": {
        "width": 540,
        "height": 240,
        "content": "## 1. Validate Auth0 tokens using JWKS URI\n**How to Use**\n* Only applicable for self-hosted n8n\n* Install JWK-RSA into your environment: `npm i -g jwk-rsa`\n* Ensure env var is set: `NODE_FUNCTION_ALLO"
      }
    },
    {
      "id": "25dfb1dc-afb1-43b1-ad00-136454ef321b",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -320,
        360
      ],
      "parameters": {
        "width": 540,
        "height": 240,
        "content": "## 2. Validate Auth0 tokens using Signing Cert\n**How to Use**\n* Only applicable for self-hosted n8n\n* Ensure env var is set: `NODE_FUNCTION_ALLOW_EXTERNAL=*`\n* Edit \"Using Public Cert\" to add your Aut"
      }
    },
    {
      "id": "fdb77df6-fcb6-47f9-896d-1f12222575d1",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -820,
        -420
      ],
      "parameters": {
        "width": 400,
        "height": 1120,
        "content": "## Try It Out\n### This n8n template shows how to validate API requests with Auth0 Authorization tokens.\n\nAuth0 doesn't work with the standard JWT auth option because:\n1) Auth0 tokens use the RS256 alg"
      }
    },
    {
      "id": "35fb0df0-e871-44b1-b164-511d30a49bbb",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -820,
        720
      ],
      "parameters": {
        "width": 400,
        "height": 140,
        "content": "### SELF-HOSTED ONLY\nThis template requires third party dependencies which can only be installed using the community self-hosted version of n8n. This template, unfortunately, will not work on n8n clou"
      }
    }
  ],
  "connections": {
    "Webhook": {
      "main": [
        [
          {
            "node": "Using Public Cert",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Webhook1": {
      "main": [
        [
          {
            "node": "Using JWK-RSA",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Using JWK-RSA": {
      "main": [
        [
          {
            "node": "Continue with Request",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "401 Unauthorized",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Using Public Cert": {
      "main": [
        [
          {
            "node": "Continue with Request1",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "401 Unauthorized1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Continue with Request": {
      "main": [
        [
          {
            "node": "200 OK",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Continue with Request1": {
      "main": [
        [
          {
            "node": "200 OK1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}