{"_id":"@caleblawson/auth-auth0","name":"@caleblawson/auth-auth0","dist-tags":{"latest":"0.10.0"},"versions":{"0.10.0":{"name":"@caleblawson/auth-auth0","version":"0.10.0","description":"Mastra Auth0 Auth integration","type":"module","main":"dist/index.js","types":"dist/index.d.ts","exports":{".":{"import":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"require":{"types":"./dist/index.d.cts","default":"./dist/index.cjs"}},"./package.json":"./package.json"},"license":"Elastic-2.0","dependencies":{"jose":"^6.0.11"},"devDependencies":{"@types/node":"^20.19.0","eslint":"^9.28.0","tsup":"^8.5.0","typescript":"^5.8.3","vitest":"^2.1.9","@internal/lint":"0.0.13","@mastra/core":"npm:@caleblawson/core@0.10.7-alpha.0"},"scripts":{"build":"tsup src/index.ts --format esm,cjs --experimental-dts --clean --treeshake","build:watch":"pnpm build --watch","test":"vitest run","lint":"eslint ."},"gitHead":"c31e90130a5c9765c23f688ecea70adc6164543d","_id":"@caleblawson/auth-auth0@0.10.0","_integrity":"sha512-RbwvWyo0Xd8HaGr7osTPosxrxAelfWmhC+Ct7oNn4T+lSqOAe+MCk/GX+6n1H/zW7x8NPf0AqZw2ikbBezg8fQ==","_resolved":"C:\\Users\\caleb\\AppData\\Local\\Temp\\b27668426f4d10245dbd7c9499a28c33\\caleblawson-auth-auth0-0.10.0.tgz","_from":"file:caleblawson-auth-auth0-0.10.0.tgz","_nodeVersion":"21.2.0","_npmVersion":"10.2.3","dist":{"integrity":"sha512-RbwvWyo0Xd8HaGr7osTPosxrxAelfWmhC+Ct7oNn4T+lSqOAe+MCk/GX+6n1H/zW7x8NPf0AqZw2ikbBezg8fQ==","shasum":"a58a43aa53095efdb842b35495294855e796cfd6","tarball":"https://registry.npmjs.org/@caleblawson/auth-auth0/-/auth-auth0-0.10.0.tgz","fileCount":23,"unpackedSize":117586,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQCReACEPJSgCJAc41QAZwjpGDC4hK2i86kTQ6T8JNCgQwIhAJVMYam+u0N57YrPRYVctkmnvv3tiEMoKPsBWkp9krcC"}]},"_npmUser":{"name":"caleblawson","email":"caleb.lawson@dynapt.com","actor":{"name":"caleblawson","email":"caleb.lawson@dynapt.com","type":"user"}},"directories":{},"maintainers":[{"name":"caleblawson","email":"caleb.lawson@dynapt.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/auth-auth0_0.10.0_1750378161849_0.32933098942985173"},"_hasShrinkwrap":false}},"time":{"created":"2025-06-20T00:09:21.779Z","0.10.0":"2025-06-20T00:09:22.080Z","modified":"2025-06-20T00:09:22.338Z"},"maintainers":[{"name":"caleblawson","email":"caleb.lawson@dynapt.com"}],"description":"Mastra Auth0 Auth integration","license":"Elastic-2.0","readme":"# @mastra/auth-auth0\r\n\r\nA Mastra authentication provider for Auth0 integration. This package provides seamless authentication and authorization using Auth0's JWT tokens.\r\n\r\n## Installation\r\n\r\n```bash\r\nnpm install @mastra/auth-auth0\r\n# or\r\nyarn add @mastra/auth-auth0\r\n# or\r\npnpm add @mastra/auth-auth0\r\n```\r\n\r\n## Usage\r\n\r\n```typescript\r\nimport { Mastra } from '@mastra/core';\r\nimport { MastraAuthAuth0 } from '@mastra/auth-auth0';\r\n\r\n// Initialize with options\r\nconst auth0Provider = new MastraAuthAuth0({\r\n  domain: 'your-tenant.auth0.com',\r\n  audience: 'your-api-identifier',\r\n});\r\n\r\n// Or use environment variables\r\nconst auth0Provider = new MastraAuthAuth0();\r\n\r\n// Enable auth in Mastra\r\nconst mastra = new Mastra({\r\n  ...\r\n  server: {\r\n    experimental_auth: auth0Provider,\r\n  },\r\n});\r\n```\r\n\r\n## Configuration\r\n\r\nThe package can be configured either through constructor options or environment variables:\r\n\r\n### Constructor Options\r\n\r\n```typescript\r\ninterface MastraAuthAuth0Options {\r\n  domain?: string; // Your Auth0 domain\r\n  audience?: string; // Your Auth0 API identifier\r\n}\r\n```\r\n\r\n### Environment Variables\r\n\r\n- `AUTH0_DOMAIN`: Your Auth0 domain (e.g., 'your-tenant.auth0.com')\r\n- `AUTH0_AUDIENCE`: Your Auth0 API identifier\r\n\r\n## Features\r\n\r\n- JWT token verification using Auth0's JWKS\r\n- Automatic token validation against Auth0's issuer\r\n- Audience validation\r\n- Type-safe user payload\r\n\r\n## Example\r\n\r\n```typescript\r\nimport { MastraAuthAuth0 } from '@mastra/auth-auth0';\r\n\r\nconst auth0Provider = new MastraAuthAuth0({\r\n  domain: 'your-tenant.auth0.com',\r\n  audience: 'your-api-identifier',\r\n});\r\n\r\n// Authenticate a token\r\nconst user = await auth0Provider.authenticateToken('your-jwt-token');\r\n\r\n// Authorize a user\r\nconst isAuthorized = await auth0Provider.authorizeUser(user);\r\n```\r\n\r\n## Requirements\r\n\r\n- Node.js 16 or higher\r\n- Auth0 account and configured application\r\n- Valid Auth0 domain and API identifier\r\n\r\n## License\r\n\r\nMIT\r\n","readmeFilename":"README.md","_rev":"1-0635e5785161ad8e18c37093a5ae23ac"}