Full Code of nextauthjs/next-auth for AI

main f45706836760 cached
1094 files
2.7 MB
773.5k tokens
1202 symbols
1 requests
Download .txt
Showing preview only (3,062K chars total). Download the full file or copy to clipboard to get everything.
Repository: nextauthjs/next-auth
Branch: main
Commit: f45706836760
Files: 1094
Total size: 2.7 MB

Directory structure:
gitextract_vbasb9xy/

├── .dockerignore
├── .github/
│   ├── CODEOWNERS
│   ├── DISCUSSION_TEMPLATE/
│   │   ├── ideas.yml
│   │   └── questions.yml
│   ├── ISSUE_TEMPLATE/
│   │   ├── 1_bug_framework.yml
│   │   ├── 2_bug_provider.yml
│   │   ├── 3_bug_adapter.yml
│   │   ├── 4_documentation.yml
│   │   └── config.yml
│   ├── PULL_REQUEST_TEMPLATE.md
│   ├── broken-link-checker/
│   │   ├── action.yml
│   │   ├── index.d.ts
│   │   ├── package.json
│   │   ├── src/
│   │   │   └── index.ts
│   │   └── tsconfig.json
│   ├── dependabot.yml
│   ├── good-first-issue.md
│   ├── help-needed.md
│   ├── invalid-reproduction.md
│   ├── pr-labeler.yml
│   ├── stale.yml
│   ├── sync.yml
│   ├── version-pr/
│   │   ├── action.yml
│   │   └── index.js
│   └── workflows/
│       ├── broken-link-checker.yml
│       ├── codeql-analysis.yml
│       ├── pr-labeler.yml
│       ├── release.yml
│       ├── sync-examples.yml
│       └── triage.yml
├── .gitignore
├── .nvmrc
├── .prettierignore
├── .vscode/
│   ├── extensions.json
│   ├── settings.json
│   └── snippets.code-snippets
├── LICENSE
├── README.md
├── apps/
│   ├── dev/
│   │   ├── express/
│   │   │   ├── .gitignore
│   │   │   ├── .prettierignore
│   │   │   ├── README.md
│   │   │   ├── api/
│   │   │   │   └── index.js
│   │   │   ├── package.json
│   │   │   ├── public/
│   │   │   │   └── css/
│   │   │   │       └── style.css
│   │   │   ├── src/
│   │   │   │   ├── app.ts
│   │   │   │   ├── config/
│   │   │   │   │   └── auth.config.ts
│   │   │   │   ├── errors.ts
│   │   │   │   ├── middleware/
│   │   │   │   │   ├── auth.middleware.ts
│   │   │   │   │   └── error.middleware.ts
│   │   │   │   └── server.ts
│   │   │   ├── tsconfig.json
│   │   │   └── views/
│   │   │       ├── error.pug
│   │   │       ├── index.pug
│   │   │       ├── layout.pug
│   │   │       └── protected.pug
│   │   ├── nextjs/
│   │   │   ├── .gitignore
│   │   │   ├── .vscode/
│   │   │   │   └── settings.json
│   │   │   ├── README.md
│   │   │   ├── app/
│   │   │   │   ├── api/
│   │   │   │   │   └── protected/
│   │   │   │   │       └── route.ts
│   │   │   │   ├── auth/
│   │   │   │   │   └── [...nextauth]/
│   │   │   │   │       └── route.ts
│   │   │   │   ├── client.tsx
│   │   │   │   ├── dashboard/
│   │   │   │   │   └── page.tsx
│   │   │   │   ├── layout.tsx
│   │   │   │   ├── page.tsx
│   │   │   │   └── styles.css
│   │   │   ├── auth.ts
│   │   │   ├── components/
│   │   │   │   ├── access-denied.tsx
│   │   │   │   ├── footer.module.css
│   │   │   │   ├── footer.tsx
│   │   │   │   ├── header.module.css
│   │   │   │   └── header.tsx
│   │   │   ├── middleware.ts
│   │   │   ├── next-env.d.ts
│   │   │   ├── next.config.js
│   │   │   ├── package.json
│   │   │   ├── pages/
│   │   │   │   ├── _app.tsx
│   │   │   │   ├── api/
│   │   │   │   │   └── examples/
│   │   │   │   │       ├── protected.ts
│   │   │   │   │       └── session.ts
│   │   │   │   ├── client.tsx
│   │   │   │   ├── credentials.tsx
│   │   │   │   ├── email.tsx
│   │   │   │   ├── policy.tsx
│   │   │   │   ├── protected-ssr.tsx
│   │   │   │   ├── protected.tsx
│   │   │   │   └── styles.css
│   │   │   ├── prisma/
│   │   │   │   ├── migrations/
│   │   │   │   │   ├── 20231023165117_/
│   │   │   │   │   │   └── migration.sql
│   │   │   │   │   ├── 20240124035029_init/
│   │   │   │   │   │   └── migration.sql
│   │   │   │   │   └── migration_lock.toml
│   │   │   │   └── schema.prisma
│   │   │   ├── tests/
│   │   │   │   └── signin.spec.ts
│   │   │   └── tsconfig.json
│   │   ├── qwik/
│   │   │   ├── .gitignore
│   │   │   ├── README.md
│   │   │   ├── package.json
│   │   │   ├── public/
│   │   │   │   ├── manifest.json
│   │   │   │   └── robots.txt
│   │   │   ├── qwik.env.d.ts
│   │   │   ├── src/
│   │   │   │   ├── components/
│   │   │   │   │   └── router-head/
│   │   │   │   │       └── router-head.tsx
│   │   │   │   ├── entry.dev.tsx
│   │   │   │   ├── entry.preview.tsx
│   │   │   │   ├── entry.ssr.tsx
│   │   │   │   ├── global.css
│   │   │   │   ├── root.tsx
│   │   │   │   └── routes/
│   │   │   │       ├── index.tsx
│   │   │   │       ├── layout.tsx
│   │   │   │       ├── plugin@auth.ts
│   │   │   │       └── service-worker.ts
│   │   │   ├── tsconfig.json
│   │   │   └── vite.config.ts
│   │   └── sveltekit/
│   │       ├── .env.example
│   │       ├── .eslintignore
│   │       ├── .eslintrc.cjs
│   │       ├── .gitignore
│   │       ├── .prettierignore
│   │       ├── .prettierrc
│   │       ├── README.md
│   │       ├── package.json
│   │       ├── src/
│   │       │   ├── app.d.ts
│   │       │   ├── app.html
│   │       │   ├── auth.ts
│   │       │   ├── components/
│   │       │   │   └── header.svelte
│   │       │   ├── hooks.server.ts
│   │       │   ├── routes/
│   │       │   │   ├── +layout.server.ts
│   │       │   │   ├── +layout.svelte
│   │       │   │   ├── +page.svelte
│   │       │   │   ├── protected/
│   │       │   │   │   └── +page.svelte
│   │       │   │   ├── signin/
│   │       │   │   │   └── +page.server.ts
│   │       │   │   └── signout/
│   │       │   │       └── +page.server.ts
│   │       │   └── style.css
│   │       ├── svelte.config.js
│   │       ├── tsconfig.json
│   │       └── vite.config.js
│   ├── examples/
│   │   ├── express/
│   │   │   ├── .eslintrc.cjs
│   │   │   ├── .gitignore
│   │   │   ├── .prettierignore
│   │   │   ├── .prettierrc
│   │   │   ├── README.md
│   │   │   ├── api/
│   │   │   │   └── index.js
│   │   │   ├── package.json
│   │   │   ├── public/
│   │   │   │   └── css/
│   │   │   │       └── style.css
│   │   │   ├── src/
│   │   │   │   ├── app.ts
│   │   │   │   ├── config/
│   │   │   │   │   └── auth.config.ts
│   │   │   │   ├── errors.ts
│   │   │   │   ├── middleware/
│   │   │   │   │   ├── auth.middleware.ts
│   │   │   │   │   └── error.middleware.ts
│   │   │   │   └── server.ts
│   │   │   ├── tailwind.config.js
│   │   │   ├── tsconfig.json
│   │   │   ├── types/
│   │   │   │   └── express/
│   │   │   │       └── index.d.ts
│   │   │   ├── vercel.json
│   │   │   └── views/
│   │   │       ├── error.pug
│   │   │       ├── index.pug
│   │   │       ├── layout.pug
│   │   │       └── protected.pug
│   │   ├── nextjs/
│   │   │   ├── .gitignore
│   │   │   ├── Dockerfile
│   │   │   ├── README.md
│   │   │   ├── app/
│   │   │   │   ├── [...proxy]/
│   │   │   │   │   └── route.tsx
│   │   │   │   ├── api/
│   │   │   │   │   └── protected/
│   │   │   │   │       └── route.ts
│   │   │   │   ├── api-example/
│   │   │   │   │   └── page.tsx
│   │   │   │   ├── auth/
│   │   │   │   │   └── [...nextauth]/
│   │   │   │   │       └── route.ts
│   │   │   │   ├── client-example/
│   │   │   │   │   └── page.tsx
│   │   │   │   ├── globals.css
│   │   │   │   ├── layout.tsx
│   │   │   │   ├── middleware-example/
│   │   │   │   │   └── page.tsx
│   │   │   │   ├── page.tsx
│   │   │   │   ├── policy/
│   │   │   │   │   └── page.tsx
│   │   │   │   └── server-example/
│   │   │   │       └── page.tsx
│   │   │   ├── auth.ts
│   │   │   ├── components/
│   │   │   │   ├── auth-components.tsx
│   │   │   │   ├── client-example.tsx
│   │   │   │   ├── custom-link.tsx
│   │   │   │   ├── footer.tsx
│   │   │   │   ├── header.tsx
│   │   │   │   ├── main-nav.tsx
│   │   │   │   ├── session-data.tsx
│   │   │   │   ├── ui/
│   │   │   │   │   ├── avatar.tsx
│   │   │   │   │   ├── button.tsx
│   │   │   │   │   ├── dropdown-menu.tsx
│   │   │   │   │   ├── input.tsx
│   │   │   │   │   └── navigation-menu.tsx
│   │   │   │   └── user-button.tsx
│   │   │   ├── components.json
│   │   │   ├── docker-compose.yml
│   │   │   ├── lib/
│   │   │   │   └── utils.ts
│   │   │   ├── middleware.ts
│   │   │   ├── next.config.js
│   │   │   ├── package.json
│   │   │   ├── postcss.config.js
│   │   │   ├── tailwind.config.js
│   │   │   ├── test-docker.sh
│   │   │   └── tsconfig.json
│   │   ├── nextjs-pages/
│   │   │   ├── .gitignore
│   │   │   ├── README.md
│   │   │   ├── app/
│   │   │   │   └── api/
│   │   │   │       └── auth/
│   │   │   │           └── [...nextauth]/
│   │   │   │               └── route.ts
│   │   │   ├── auth.ts
│   │   │   ├── components/
│   │   │   │   ├── auth-components.tsx
│   │   │   │   ├── client-example.tsx
│   │   │   │   ├── custom-link.tsx
│   │   │   │   ├── footer.tsx
│   │   │   │   ├── header.tsx
│   │   │   │   ├── main-nav.tsx
│   │   │   │   ├── session-data.tsx
│   │   │   │   ├── ui/
│   │   │   │   │   ├── avatar.tsx
│   │   │   │   │   ├── button.tsx
│   │   │   │   │   ├── dropdown-menu.tsx
│   │   │   │   │   ├── input.tsx
│   │   │   │   │   └── navigation-menu.tsx
│   │   │   │   └── user-button.tsx
│   │   │   ├── components.json
│   │   │   ├── lib/
│   │   │   │   └── utils.ts
│   │   │   ├── middleware.ts
│   │   │   ├── next.config.js
│   │   │   ├── package.json
│   │   │   ├── pages/
│   │   │   │   ├── _app.tsx
│   │   │   │   ├── api/
│   │   │   │   │   └── protected.ts
│   │   │   │   ├── api-example/
│   │   │   │   │   └── index.tsx
│   │   │   │   ├── client-example/
│   │   │   │   │   └── index.tsx
│   │   │   │   ├── globals.css
│   │   │   │   ├── index.tsx
│   │   │   │   ├── middleware-example/
│   │   │   │   │   └── index.tsx
│   │   │   │   ├── policy/
│   │   │   │   │   └── index.tsx
│   │   │   │   └── server-example/
│   │   │   │       └── index.tsx
│   │   │   ├── postcss.config.js
│   │   │   ├── tailwind.config.js
│   │   │   └── tsconfig.json
│   │   ├── qwik/
│   │   │   ├── .eslintignore
│   │   │   ├── .eslintrc.cjs
│   │   │   ├── .gitignore
│   │   │   ├── .prettierignore
│   │   │   ├── .prettierrc.js
│   │   │   ├── .vscode/
│   │   │   │   ├── launch.json
│   │   │   │   ├── qwik-city.code-snippets
│   │   │   │   └── qwik.code-snippets
│   │   │   ├── README.md
│   │   │   ├── adapters/
│   │   │   │   └── vercel-edge/
│   │   │   │       └── vite.config.ts
│   │   │   ├── package.json
│   │   │   ├── postcss.config.cjs
│   │   │   ├── public/
│   │   │   │   ├── manifest.json
│   │   │   │   └── robots.txt
│   │   │   ├── qwik.env.d.ts
│   │   │   ├── src/
│   │   │   │   ├── components/
│   │   │   │   │   ├── avatar/
│   │   │   │   │   │   └── avatar.tsx
│   │   │   │   │   ├── header/
│   │   │   │   │   │   └── header.tsx
│   │   │   │   │   ├── icones/
│   │   │   │   │   │   └── qwik.tsx
│   │   │   │   │   └── router-head/
│   │   │   │   │       └── router-head.tsx
│   │   │   │   ├── entry.dev.tsx
│   │   │   │   ├── entry.preview.tsx
│   │   │   │   ├── entry.ssr.tsx
│   │   │   │   ├── entry.vercel-edge.tsx
│   │   │   │   ├── global.css
│   │   │   │   ├── root.tsx
│   │   │   │   └── routes/
│   │   │   │       ├── index.tsx
│   │   │   │       ├── layout.tsx
│   │   │   │       ├── plugin@auth.ts
│   │   │   │       ├── protected/
│   │   │   │       │   └── index.tsx
│   │   │   │       └── service-worker.ts
│   │   │   ├── tailwind.config.js
│   │   │   ├── tsconfig.json
│   │   │   ├── vercel.json
│   │   │   └── vite.config.ts
│   │   ├── solid-start/
│   │   │   ├── .gitignore
│   │   │   ├── README.md
│   │   │   ├── package.json
│   │   │   ├── postcss.config.cjs
│   │   │   ├── src/
│   │   │   │   ├── components/
│   │   │   │   │   ├── NavBar/
│   │   │   │   │   │   ├── NavBar.tsx
│   │   │   │   │   │   └── index.ts
│   │   │   │   │   ├── Protected/
│   │   │   │   │   │   ├── Protected.tsx
│   │   │   │   │   │   └── index.ts
│   │   │   │   │   └── index.ts
│   │   │   │   ├── entry-client.tsx
│   │   │   │   ├── entry-server.tsx
│   │   │   │   ├── env/
│   │   │   │   │   ├── client.ts
│   │   │   │   │   ├── schema.ts
│   │   │   │   │   └── server.ts
│   │   │   │   ├── root.css
│   │   │   │   ├── root.tsx
│   │   │   │   └── routes/
│   │   │   │       ├── api/
│   │   │   │       │   └── auth/
│   │   │   │       │       └── [...solidauth].ts
│   │   │   │       ├── index.tsx
│   │   │   │       └── protected.tsx
│   │   │   ├── tailwind.config.cjs
│   │   │   ├── tsconfig.json
│   │   │   └── vite.config.ts
│   │   └── sveltekit/
│   │       ├── .env.example
│   │       ├── .eslintignore
│   │       ├── .eslintrc.cjs
│   │       ├── .gitignore
│   │       ├── .prettierignore
│   │       ├── .prettierrc
│   │       ├── README.md
│   │       ├── package.json
│   │       ├── src/
│   │       │   ├── app.d.ts
│   │       │   ├── app.html
│   │       │   ├── auth.ts
│   │       │   ├── components/
│   │       │   │   ├── external-icon.svelte
│   │       │   │   ├── footer.svelte
│   │       │   │   └── header.svelte
│   │       │   ├── hooks.server.ts
│   │       │   └── routes/
│   │       │       ├── +layout.server.ts
│   │       │       ├── +layout.svelte
│   │       │       ├── +page.svelte
│   │       │       ├── protected/
│   │       │       │   └── +page.svelte
│   │       │       ├── signin/
│   │       │       │   └── +page.server.ts
│   │       │       └── signout/
│   │       │           └── +page.server.ts
│   │       ├── svelte.config.js
│   │       ├── tsconfig.json
│   │       └── vite.config.js
│   ├── playgrounds/
│   │   └── README.md
│   └── proxy/
│       ├── .gitignore
│       ├── README.md
│       ├── api/
│       │   ├── [auth].ts
│       │   └── callback/
│       │       └── [auth].ts
│       ├── package.json
│       └── tsconfig.json
├── docs/
│   ├── .gitignore
│   ├── .vscode/
│   │   └── settings.json
│   ├── LICENSE
│   ├── README.md
│   ├── app/
│   │   └── api/
│   │       ├── cron/
│   │       │   └── route.ts
│   │       └── og/
│   │           └── route.tsx
│   ├── components/
│   │   ├── Accordion/
│   │   │   └── index.tsx
│   │   ├── Blur/
│   │   │   └── index.tsx
│   │   ├── Code/
│   │   │   └── index.tsx
│   │   ├── DocSearch/
│   │   │   ├── index.tsx
│   │   │   └── wrapper.tsx
│   │   ├── Footer/
│   │   │   └── index.tsx
│   │   ├── FrameworkLink/
│   │   │   └── index.tsx
│   │   ├── Guides/
│   │   │   └── index.tsx
│   │   ├── Icons/
│   │   │   ├── ArrowRight.tsx
│   │   │   ├── ArrowSquareOut.tsx
│   │   │   ├── Browser.tsx
│   │   │   ├── CaretRight.tsx
│   │   │   ├── ChatCircleText.tsx
│   │   │   ├── Check.tsx
│   │   │   ├── Flask.tsx
│   │   │   ├── GitBranch.tsx
│   │   │   ├── GithubLogo.tsx
│   │   │   ├── Link.tsx
│   │   │   ├── Plus.tsx
│   │   │   ├── SealWarning.tsx
│   │   │   ├── ShieldStar.tsx
│   │   │   ├── Sparkle.tsx
│   │   │   └── index.tsx
│   │   ├── InkeepSearch/
│   │   │   └── index.tsx
│   │   ├── Link/
│   │   │   └── index.tsx
│   │   ├── ListDisclosure/
│   │   │   ├── index.tsx
│   │   │   └── useListDisclosure.ts
│   │   ├── LogosMarquee/
│   │   │   ├── index.tsx
│   │   │   └── logo.tsx
│   │   ├── OAuthProviderInstructions/
│   │   │   ├── OAuthProviderSelect.tsx
│   │   │   ├── content/
│   │   │   │   ├── components/
│   │   │   │   │   ├── SetupCode.tsx
│   │   │   │   │   ├── SignInCode.tsx
│   │   │   │   │   ├── StepTitle.tsx
│   │   │   │   │   └── TSIcon.tsx
│   │   │   │   └── index.tsx
│   │   │   └── index.tsx
│   │   ├── RichTabs/
│   │   │   ├── index.tsx
│   │   │   └── useRichTabs.ts
│   │   ├── Screenshot/
│   │   │   └── index.tsx
│   │   └── SearchBarProviders/
│   │       └── PreviewProviders.tsx
│   ├── hooks/
│   │   └── use-select-combobox.ts
│   ├── next-env.d.ts
│   ├── next-sitemap.config.cjs
│   ├── next.config.js
│   ├── package.json
│   ├── pages/
│   │   ├── 404.mdx
│   │   ├── _app.tsx
│   │   ├── _document.tsx
│   │   ├── _meta.js
│   │   ├── animated-stars.css
│   │   ├── concepts/
│   │   │   ├── _meta.js
│   │   │   ├── database-models.mdx
│   │   │   ├── index.mdx
│   │   │   ├── oauth.mdx
│   │   │   └── session-strategies.mdx
│   │   ├── contributors.mdx
│   │   ├── data/
│   │   │   └── manifest.json
│   │   ├── getting-started/
│   │   │   ├── _meta.js
│   │   │   ├── adapters/
│   │   │   │   ├── _meta.js
│   │   │   │   ├── azure-tables.mdx
│   │   │   │   ├── d1.mdx
│   │   │   │   ├── dgraph.mdx
│   │   │   │   ├── drizzle.mdx
│   │   │   │   ├── dynamodb.mdx
│   │   │   │   ├── edgedb.mdx
│   │   │   │   ├── fauna.mdx
│   │   │   │   ├── firebase.mdx
│   │   │   │   ├── hasura.mdx
│   │   │   │   ├── kysely.mdx
│   │   │   │   ├── mikro-orm.mdx
│   │   │   │   ├── mongodb.mdx
│   │   │   │   ├── neo4j.mdx
│   │   │   │   ├── neon.mdx
│   │   │   │   ├── pg.mdx
│   │   │   │   ├── pouchdb.mdx
│   │   │   │   ├── prisma.mdx
│   │   │   │   ├── sequelize.mdx
│   │   │   │   ├── supabase.mdx
│   │   │   │   ├── surrealdb.mdx
│   │   │   │   ├── typeorm.mdx
│   │   │   │   ├── unstorage.mdx
│   │   │   │   ├── upstash-redis.mdx
│   │   │   │   └── xata.mdx
│   │   │   ├── authentication/
│   │   │   │   ├── _meta.js
│   │   │   │   ├── credentials.mdx
│   │   │   │   ├── email.mdx
│   │   │   │   ├── oauth.mdx
│   │   │   │   └── webauthn.mdx
│   │   │   ├── authentication.mdx
│   │   │   ├── database.mdx
│   │   │   ├── deployment.mdx
│   │   │   ├── index.mdx
│   │   │   ├── installation.mdx
│   │   │   ├── integrations.mdx
│   │   │   ├── migrate-to-better-auth.mdx
│   │   │   ├── migrating-to-v5.mdx
│   │   │   ├── providers/
│   │   │   │   ├── 42-school.mdx
│   │   │   │   ├── apple.mdx
│   │   │   │   ├── asgardeo.mdx
│   │   │   │   ├── auth0.mdx
│   │   │   │   ├── authentik.mdx
│   │   │   │   ├── azure-ad-b2c.mdx
│   │   │   │   ├── azure-ad.mdx
│   │   │   │   ├── azure-devops.mdx
│   │   │   │   ├── bankid-no.mdx
│   │   │   │   ├── battlenet.mdx
│   │   │   │   ├── beyondidentity.mdx
│   │   │   │   ├── bitbucket.mdx
│   │   │   │   ├── box.mdx
│   │   │   │   ├── boxyhq-saml.mdx
│   │   │   │   ├── bungie.mdx
│   │   │   │   ├── click-up.mdx
│   │   │   │   ├── cognito.mdx
│   │   │   │   ├── coinbase.mdx
│   │   │   │   ├── credentials.mdx
│   │   │   │   ├── descope.mdx
│   │   │   │   ├── discord.mdx
│   │   │   │   ├── dribbble.mdx
│   │   │   │   ├── dropbox.mdx
│   │   │   │   ├── duende-identity-server6.mdx
│   │   │   │   ├── eveonline.mdx
│   │   │   │   ├── facebook.mdx
│   │   │   │   ├── faceit.mdx
│   │   │   │   ├── figma.mdx
│   │   │   │   ├── forwardemail.mdx
│   │   │   │   ├── foursquare.mdx
│   │   │   │   ├── freshbooks.mdx
│   │   │   │   ├── frontegg.mdx
│   │   │   │   ├── fusionauth.mdx
│   │   │   │   ├── github.mdx
│   │   │   │   ├── gitlab.mdx
│   │   │   │   ├── google.mdx
│   │   │   │   ├── hubspot.mdx
│   │   │   │   ├── identity-server4.mdx
│   │   │   │   ├── instagram.mdx
│   │   │   │   ├── kakao.mdx
│   │   │   │   ├── keycloak.mdx
│   │   │   │   ├── line.mdx
│   │   │   │   ├── linkedin.mdx
│   │   │   │   ├── logto.mdx
│   │   │   │   ├── loops.mdx
│   │   │   │   ├── mailchimp.mdx
│   │   │   │   ├── mailgun.mdx
│   │   │   │   ├── mailru.mdx
│   │   │   │   ├── mastodon.mdx
│   │   │   │   ├── mattermost.mdx
│   │   │   │   ├── medium.mdx
│   │   │   │   ├── microsoft-entra-id.mdx
│   │   │   │   ├── naver.mdx
│   │   │   │   ├── netlify.mdx
│   │   │   │   ├── netsuite.mdx
│   │   │   │   ├── nextcloud.mdx
│   │   │   │   ├── nodemailer.mdx
│   │   │   │   ├── notion.mdx
│   │   │   │   ├── okta.mdx
│   │   │   │   ├── onelogin.mdx
│   │   │   │   ├── osso.mdx
│   │   │   │   ├── osu.mdx
│   │   │   │   ├── passage.mdx
│   │   │   │   ├── passkey.mdx
│   │   │   │   ├── patreon.mdx
│   │   │   │   ├── pinterest.mdx
│   │   │   │   ├── pipedrive.mdx
│   │   │   │   ├── postmark.mdx
│   │   │   │   ├── reddit.mdx
│   │   │   │   ├── resend.mdx
│   │   │   │   ├── sailpoint.mdx
│   │   │   │   ├── salesforce.mdx
│   │   │   │   ├── sendgrid.mdx
│   │   │   │   ├── simplelogin.mdx
│   │   │   │   ├── slack.mdx
│   │   │   │   ├── spotify.mdx
│   │   │   │   ├── strava.mdx
│   │   │   │   ├── threads.mdx
│   │   │   │   ├── tiktok.mdx
│   │   │   │   ├── todoist.mdx
│   │   │   │   ├── trakt.mdx
│   │   │   │   ├── twitch.mdx
│   │   │   │   ├── twitter.mdx
│   │   │   │   ├── united-effects.mdx
│   │   │   │   ├── vipps-mobilepay.mdx
│   │   │   │   ├── vk.mdx
│   │   │   │   ├── webex.mdx
│   │   │   │   ├── wikimedia.mdx
│   │   │   │   ├── wordpress.mdx
│   │   │   │   ├── workos.mdx
│   │   │   │   ├── yandex.mdx
│   │   │   │   ├── zitadel.mdx
│   │   │   │   ├── zoho.mdx
│   │   │   │   └── zoom.mdx
│   │   │   ├── session-management/
│   │   │   │   ├── _meta.js
│   │   │   │   ├── custom-pages.mdx
│   │   │   │   ├── get-session.mdx
│   │   │   │   ├── login.mdx
│   │   │   │   └── protecting.mdx
│   │   │   └── typescript.mdx
│   │   ├── global.css
│   │   ├── guides/
│   │   │   ├── _meta.js
│   │   │   ├── configuring-github.mdx
│   │   │   ├── configuring-http-email.mdx
│   │   │   ├── configuring-oauth-providers.mdx
│   │   │   ├── configuring-resend.mdx
│   │   │   ├── corporate-proxy.mdx
│   │   │   ├── creating-a-database-adapter.mdx
│   │   │   ├── creating-a-framework-integration.mdx
│   │   │   ├── debugging.mdx
│   │   │   ├── edge-compatibility.mdx
│   │   │   ├── environment-variables.mdx
│   │   │   ├── extending-the-session.mdx
│   │   │   ├── integrating-third-party-backends.mdx
│   │   │   ├── pages/
│   │   │   │   ├── _meta.js
│   │   │   │   ├── built-in-pages.mdx
│   │   │   │   ├── error.mdx
│   │   │   │   ├── signin.mdx
│   │   │   │   └── signout.mdx
│   │   │   ├── refresh-token-rotation.mdx
│   │   │   ├── restricting-user-access.mdx
│   │   │   ├── role-based-access-control.mdx
│   │   │   └── testing.mdx
│   │   ├── index.mdx
│   │   ├── reference/
│   │   │   └── _meta.js
│   │   └── security.mdx
│   ├── postcss.config.cjs
│   ├── public/
│   │   └── .well-known/
│   │       └── security.txt
│   ├── tailwind.config.js
│   ├── theme.config.tsx
│   ├── tsconfig.json
│   ├── typedoc-nextauth.js
│   ├── typedoc.config.cjs
│   ├── types.d.ts
│   ├── utils/
│   │   ├── types.ts
│   │   ├── useCopyButton.ts
│   │   └── useInkeepSettings.ts
│   └── vercel.json
├── eslint.config.mjs
├── lefthook.yml
├── package.json
├── packages/
│   ├── adapter-azure-tables/
│   │   ├── README.md
│   │   ├── package.json
│   │   ├── src/
│   │   │   └── index.ts
│   │   ├── test/
│   │   │   ├── index.test.ts
│   │   │   └── test.sh
│   │   ├── tsconfig.json
│   │   └── typedoc.config.cjs
│   ├── adapter-d1/
│   │   ├── README.md
│   │   ├── package.json
│   │   ├── src/
│   │   │   ├── index.ts
│   │   │   ├── migrations.ts
│   │   │   └── queries.ts
│   │   ├── test/
│   │   │   └── index.test.ts
│   │   ├── tsconfig.json
│   │   └── typedoc.config.cjs
│   ├── adapter-dgraph/
│   │   ├── README.md
│   │   ├── package.json
│   │   ├── src/
│   │   │   ├── index.ts
│   │   │   └── lib/
│   │   │       ├── client.ts
│   │   │       └── graphql/
│   │   │           ├── fragments.ts
│   │   │           └── schema.gql
│   │   ├── test/
│   │   │   ├── index.test.ts
│   │   │   ├── private.key
│   │   │   ├── public.key
│   │   │   └── test.sh
│   │   ├── tsconfig.json
│   │   └── typedoc.config.cjs
│   ├── adapter-drizzle/
│   │   ├── README.md
│   │   ├── package.json
│   │   ├── src/
│   │   │   ├── index.ts
│   │   │   └── lib/
│   │   │       ├── mysql.ts
│   │   │       ├── pg.ts
│   │   │       ├── sqlite.ts
│   │   │       └── utils.ts
│   │   ├── test/
│   │   │   ├── fixtures.ts
│   │   │   ├── mysql/
│   │   │   │   ├── drizzle.config.ts
│   │   │   │   ├── index.test.ts
│   │   │   │   ├── migrator.ts
│   │   │   │   ├── schema.ts
│   │   │   │   └── test.sh
│   │   │   ├── mysql-multi-project-schema/
│   │   │   │   ├── drizzle.config.ts
│   │   │   │   ├── index.test.ts
│   │   │   │   ├── migrator.ts
│   │   │   │   ├── schema.ts
│   │   │   │   └── test.sh
│   │   │   ├── pg/
│   │   │   │   ├── drizzle.config.ts
│   │   │   │   ├── index.test.ts
│   │   │   │   ├── migrator.ts
│   │   │   │   ├── schema.ts
│   │   │   │   └── test.sh
│   │   │   ├── pg-multi-project-schema/
│   │   │   │   ├── drizzle.config.ts
│   │   │   │   ├── index.test.ts
│   │   │   │   ├── migrator.ts
│   │   │   │   ├── schema.ts
│   │   │   │   └── test.sh
│   │   │   ├── sqlite/
│   │   │   │   ├── drizzle.config.ts
│   │   │   │   ├── index.test.ts
│   │   │   │   ├── migrator.ts
│   │   │   │   ├── schema.ts
│   │   │   │   └── test.sh
│   │   │   └── sqlite-multi-project-schema/
│   │   │       ├── drizzle.config.ts
│   │   │       ├── index.test.ts
│   │   │       ├── migrator.ts
│   │   │       ├── schema.ts
│   │   │       └── test.sh
│   │   ├── tsconfig.json
│   │   └── typedoc.config.cjs
│   ├── adapter-dynamodb/
│   │   ├── README.md
│   │   ├── jest-dynamodb-config.cjs
│   │   ├── package.json
│   │   ├── src/
│   │   │   └── index.ts
│   │   ├── test/
│   │   │   ├── format.test.ts
│   │   │   └── index.test.ts
│   │   ├── tsconfig.json
│   │   └── typedoc.config.cjs
│   ├── adapter-edgedb/
│   │   ├── README.md
│   │   ├── package.json
│   │   ├── src/
│   │   │   └── index.ts
│   │   ├── test/
│   │   │   └── index.test.ts
│   │   ├── tsconfig.json
│   │   └── typedoc.config.cjs
│   ├── adapter-fauna/
│   │   ├── .fauna-project
│   │   ├── README.md
│   │   ├── fauna/
│   │   │   ├── account.fsl
│   │   │   ├── session.fsl
│   │   │   ├── user.fsl
│   │   │   └── verificationToken.fsl
│   │   ├── package.json
│   │   ├── src/
│   │   │   └── index.ts
│   │   ├── test/
│   │   │   ├── index.test.ts
│   │   │   └── test.sh
│   │   ├── tsconfig.json
│   │   └── typedoc.config.cjs
│   ├── adapter-firebase/
│   │   ├── README.md
│   │   ├── package.json
│   │   ├── src/
│   │   │   └── index.ts
│   │   ├── test/
│   │   │   ├── firestore.rules
│   │   │   ├── index.test.ts
│   │   │   └── test.sh
│   │   ├── tsconfig.json
│   │   ├── typedoc.config.cjs
│   │   └── vitest.config.ts
│   ├── adapter-hasura/
│   │   ├── README.md
│   │   ├── codegen.ts
│   │   ├── docker-compose.yml
│   │   ├── hasura/
│   │   │   ├── config.yaml
│   │   │   ├── metadata/
│   │   │   │   ├── actions.graphql
│   │   │   │   ├── actions.yaml
│   │   │   │   ├── allow_list.yaml
│   │   │   │   ├── api_limits.yaml
│   │   │   │   ├── cron_triggers.yaml
│   │   │   │   ├── databases/
│   │   │   │   │   ├── databases.yaml
│   │   │   │   │   └── default/
│   │   │   │   │       └── tables/
│   │   │   │   │           ├── public_accounts.yaml
│   │   │   │   │           ├── public_provider_type.yaml
│   │   │   │   │           ├── public_sessions.yaml
│   │   │   │   │           ├── public_users.yaml
│   │   │   │   │           ├── public_verification_tokens.yaml
│   │   │   │   │           └── tables.yaml
│   │   │   │   ├── graphql_schema_introspection.yaml
│   │   │   │   ├── inherited_roles.yaml
│   │   │   │   ├── network.yaml
│   │   │   │   ├── query_collections.yaml
│   │   │   │   ├── remote_schemas.yaml
│   │   │   │   ├── rest_endpoints.yaml
│   │   │   │   └── version.yaml
│   │   │   └── migrations/
│   │   │       └── default/
│   │   │           └── 1666885939998_init_nextauth_models/
│   │   │               └── up.sql
│   │   ├── package.json
│   │   ├── schema.gql
│   │   ├── src/
│   │   │   ├── index.ts
│   │   │   ├── lib/
│   │   │   │   └── client.ts
│   │   │   └── queries/
│   │   │       ├── account.graphql
│   │   │       ├── delete.graphql
│   │   │       ├── fragments.graphql
│   │   │       ├── session.graphql
│   │   │       ├── user.graphql
│   │   │       └── verification-token.graphql
│   │   ├── test/
│   │   │   ├── index.test.ts
│   │   │   └── test.sh
│   │   ├── tsconfig.json
│   │   └── typedoc.config.cjs
│   ├── adapter-kysely/
│   │   ├── README.md
│   │   ├── package.json
│   │   ├── src/
│   │   │   └── index.ts
│   │   ├── test/
│   │   │   ├── index.test.ts
│   │   │   ├── scripts/
│   │   │   │   └── mysql-init.sql
│   │   │   └── test.sh
│   │   ├── tsconfig.json
│   │   └── typedoc.config.cjs
│   ├── adapter-mikro-orm/
│   │   ├── README.md
│   │   ├── package.json
│   │   ├── src/
│   │   │   ├── index.ts
│   │   │   └── lib/
│   │   │       └── entities.ts
│   │   ├── test/
│   │   │   ├── __snapshots__/
│   │   │   │   └── schema.test.ts.snap
│   │   │   ├── entities.test.ts
│   │   │   └── schema.test.ts
│   │   ├── tsconfig.json
│   │   └── typedoc.config.cjs
│   ├── adapter-mongodb/
│   │   ├── README.md
│   │   ├── package.json
│   │   ├── src/
│   │   │   └── index.ts
│   │   ├── test/
│   │   │   ├── custom.test.ts
│   │   │   ├── index.test.ts
│   │   │   ├── serverless.test.ts
│   │   │   └── test.sh
│   │   ├── tsconfig.json
│   │   └── typedoc.config.cjs
│   ├── adapter-neo4j/
│   │   ├── README.md
│   │   ├── package.json
│   │   ├── src/
│   │   │   └── index.ts
│   │   ├── test/
│   │   │   ├── index.test.ts
│   │   │   ├── resources/
│   │   │   │   └── statements.ts
│   │   │   └── test.sh
│   │   ├── tsconfig.json
│   │   └── typedoc.config.cjs
│   ├── adapter-neon/
│   │   ├── README.md
│   │   ├── package.json
│   │   ├── schema.sql
│   │   ├── src/
│   │   │   └── index.ts
│   │   ├── test/
│   │   │   ├── index.test.ts
│   │   │   └── test.sh
│   │   ├── tsconfig.json
│   │   └── typedoc.config.cjs
│   ├── adapter-pg/
│   │   ├── README.md
│   │   ├── package.json
│   │   ├── schema.sql
│   │   ├── src/
│   │   │   └── index.ts
│   │   ├── test/
│   │   │   ├── index.test.ts
│   │   │   └── test.sh
│   │   ├── tsconfig.json
│   │   └── typedoc.config.cjs
│   ├── adapter-pouchdb/
│   │   ├── README.md
│   │   ├── package.json
│   │   ├── src/
│   │   │   └── index.ts
│   │   ├── test/
│   │   │   └── index.test.ts
│   │   ├── tsconfig.json
│   │   └── typedoc.config.cjs
│   ├── adapter-prisma/
│   │   ├── README.md
│   │   ├── package.json
│   │   ├── prisma/
│   │   │   ├── custom.prisma
│   │   │   ├── mongodb.prisma
│   │   │   └── schema.prisma
│   │   ├── src/
│   │   │   └── index.ts
│   │   ├── test/
│   │   │   ├── index.test.ts
│   │   │   └── mongodb.test.sh
│   │   ├── tsconfig.json
│   │   └── typedoc.config.js
│   ├── adapter-sequelize/
│   │   ├── README.md
│   │   ├── package.json
│   │   ├── src/
│   │   │   ├── index.ts
│   │   │   └── models.ts
│   │   ├── test/
│   │   │   └── index.test.ts
│   │   ├── tsconfig.json
│   │   └── typedoc.config.cjs
│   ├── adapter-supabase/
│   │   ├── .gitignore
│   │   ├── README.md
│   │   ├── package.json
│   │   ├── src/
│   │   │   └── index.ts
│   │   ├── supabase/
│   │   │   ├── config.toml
│   │   │   └── migrations/
│   │   │       ├── 20221108043803_create_next_auth_schema.sql
│   │   │       └── 20221108044627_create_public_users_table.sql
│   │   ├── test/
│   │   │   ├── index.test.ts
│   │   │   └── test.sh
│   │   ├── tsconfig.json
│   │   └── typedoc.config.cjs
│   ├── adapter-surrealdb/
│   │   ├── README.md
│   │   ├── package.json
│   │   ├── src/
│   │   │   └── index.ts
│   │   ├── test/
│   │   │   ├── common.ts
│   │   │   ├── index.test.ts
│   │   │   └── test.sh
│   │   ├── tsconfig.json
│   │   └── typedoc.config.cjs
│   ├── adapter-typeorm/
│   │   ├── .dockerignore
│   │   ├── README.md
│   │   ├── package.json
│   │   ├── src/
│   │   │   ├── entities.ts
│   │   │   ├── index.ts
│   │   │   └── utils.ts
│   │   ├── test/
│   │   │   ├── custom-entities.ts
│   │   │   ├── helpers.ts
│   │   │   ├── index.test.ts
│   │   │   ├── mysql/
│   │   │   │   ├── index.custom.test.ts
│   │   │   │   ├── index.test.ts
│   │   │   │   └── test.sh
│   │   │   ├── postgresql/
│   │   │   │   ├── index.custom.test.ts
│   │   │   │   ├── index.test.ts
│   │   │   │   └── test.sh
│   │   │   └── sqlite/
│   │   │       ├── index.custom.test.ts
│   │   │       ├── index.test.ts
│   │   │       └── test.sh
│   │   ├── tsconfig.json
│   │   └── typedoc.config.cjs
│   ├── adapter-unstorage/
│   │   ├── README.md
│   │   ├── package.json
│   │   ├── src/
│   │   │   └── index.ts
│   │   ├── test/
│   │   │   ├── filesystem.test.ts
│   │   │   ├── memory.test.ts
│   │   │   ├── redis-json.test.ts
│   │   │   ├── redis.test.ts
│   │   │   └── test.sh
│   │   ├── tsconfig.json
│   │   └── typedoc.config.cjs
│   ├── adapter-upstash-redis/
│   │   ├── README.md
│   │   ├── docker-compose.yml
│   │   ├── package.json
│   │   ├── src/
│   │   │   └── index.ts
│   │   ├── test/
│   │   │   ├── index.test.ts
│   │   │   └── test.sh
│   │   ├── tsconfig.json
│   │   └── typedoc.config.cjs
│   ├── adapter-xata/
│   │   ├── README.md
│   │   ├── package.json
│   │   ├── schema.json
│   │   ├── src/
│   │   │   ├── index.ts
│   │   │   └── xata.ts
│   │   ├── test/
│   │   │   └── index.test.ts
│   │   ├── tsconfig.json
│   │   └── typedoc.config.cjs
│   ├── core/
│   │   ├── README.md
│   │   ├── package.json
│   │   ├── scripts/
│   │   │   ├── generate-css.js
│   │   │   └── generate-providers.js
│   │   ├── src/
│   │   │   ├── adapters.ts
│   │   │   ├── errors.ts
│   │   │   ├── index.ts
│   │   │   ├── jwt.ts
│   │   │   ├── lib/
│   │   │   │   ├── actions/
│   │   │   │   │   ├── callback/
│   │   │   │   │   │   ├── handle-login.ts
│   │   │   │   │   │   ├── index.ts
│   │   │   │   │   │   └── oauth/
│   │   │   │   │   │       ├── callback.ts
│   │   │   │   │   │       ├── checks.ts
│   │   │   │   │   │       └── csrf-token.ts
│   │   │   │   │   ├── index.ts
│   │   │   │   │   ├── session.ts
│   │   │   │   │   ├── signin/
│   │   │   │   │   │   ├── authorization-url.ts
│   │   │   │   │   │   ├── index.ts
│   │   │   │   │   │   └── send-token.ts
│   │   │   │   │   ├── signout.ts
│   │   │   │   │   └── webauthn-options.ts
│   │   │   │   ├── index.ts
│   │   │   │   ├── init.ts
│   │   │   │   ├── pages/
│   │   │   │   │   ├── error.tsx
│   │   │   │   │   ├── index.ts
│   │   │   │   │   ├── signin.tsx
│   │   │   │   │   ├── signout.tsx
│   │   │   │   │   ├── styles.css
│   │   │   │   │   └── verify-request.tsx
│   │   │   │   ├── symbols.ts
│   │   │   │   ├── utils/
│   │   │   │   │   ├── actions.ts
│   │   │   │   │   ├── assert.ts
│   │   │   │   │   ├── callback-url.ts
│   │   │   │   │   ├── cookie.ts
│   │   │   │   │   ├── date.ts
│   │   │   │   │   ├── email.ts
│   │   │   │   │   ├── env.ts
│   │   │   │   │   ├── logger.ts
│   │   │   │   │   ├── merge.ts
│   │   │   │   │   ├── providers.ts
│   │   │   │   │   ├── session.ts
│   │   │   │   │   ├── web.ts
│   │   │   │   │   ├── webauthn-client.js
│   │   │   │   │   └── webauthn-utils.ts
│   │   │   │   └── vendored/
│   │   │   │       └── cookie.ts
│   │   │   ├── providers/
│   │   │   │   ├── 42-school.ts
│   │   │   │   ├── apple.ts
│   │   │   │   ├── asgardeo.ts
│   │   │   │   ├── atlassian.ts
│   │   │   │   ├── auth0.ts
│   │   │   │   ├── authentik.ts
│   │   │   │   ├── azure-ad-b2c.ts
│   │   │   │   ├── azure-ad.ts
│   │   │   │   ├── azure-devops.ts
│   │   │   │   ├── bankid-no.ts
│   │   │   │   ├── battlenet.ts
│   │   │   │   ├── beyondidentity.ts
│   │   │   │   ├── bitbucket.ts
│   │   │   │   ├── box.ts
│   │   │   │   ├── boxyhq-saml.ts
│   │   │   │   ├── bungie.ts
│   │   │   │   ├── click-up.ts
│   │   │   │   ├── cognito.ts
│   │   │   │   ├── coinbase.ts
│   │   │   │   ├── concept2.ts
│   │   │   │   ├── credentials.ts
│   │   │   │   ├── descope.ts
│   │   │   │   ├── discord.ts
│   │   │   │   ├── dribbble.ts
│   │   │   │   ├── dropbox.ts
│   │   │   │   ├── duende-identity-server6.ts
│   │   │   │   ├── email.ts
│   │   │   │   ├── eventbrite.ts
│   │   │   │   ├── eveonline.ts
│   │   │   │   ├── facebook.ts
│   │   │   │   ├── faceit.ts
│   │   │   │   ├── figma.ts
│   │   │   │   ├── forwardemail.ts
│   │   │   │   ├── foursquare.ts
│   │   │   │   ├── freshbooks.ts
│   │   │   │   ├── frontegg.ts
│   │   │   │   ├── fusionauth.ts
│   │   │   │   ├── github.ts
│   │   │   │   ├── gitlab.ts
│   │   │   │   ├── google.ts
│   │   │   │   ├── hubspot.ts
│   │   │   │   ├── huggingface.ts
│   │   │   │   ├── identity-server4.ts
│   │   │   │   ├── index.ts
│   │   │   │   ├── instagram.ts
│   │   │   │   ├── kakao.ts
│   │   │   │   ├── keycloak.ts
│   │   │   │   ├── kinde.ts
│   │   │   │   ├── line.ts
│   │   │   │   ├── linkedin.ts
│   │   │   │   ├── logto.ts
│   │   │   │   ├── loops.ts
│   │   │   │   ├── mailchimp.ts
│   │   │   │   ├── mailgun.ts
│   │   │   │   ├── mailru.ts
│   │   │   │   ├── mastodon.ts
│   │   │   │   ├── mattermost.ts
│   │   │   │   ├── medium.ts
│   │   │   │   ├── microsoft-entra-id.ts
│   │   │   │   ├── naver.ts
│   │   │   │   ├── netlify.ts
│   │   │   │   ├── netsuite.ts
│   │   │   │   ├── nextcloud.ts
│   │   │   │   ├── nodemailer.ts
│   │   │   │   ├── notion.ts
│   │   │   │   ├── oauth.ts
│   │   │   │   ├── okta.ts
│   │   │   │   ├── onelogin.ts
│   │   │   │   ├── ory-hydra.ts
│   │   │   │   ├── osso.ts
│   │   │   │   ├── osu.ts
│   │   │   │   ├── passage.ts
│   │   │   │   ├── passkey.ts
│   │   │   │   ├── patreon.ts
│   │   │   │   ├── ping-id.ts
│   │   │   │   ├── pinterest.ts
│   │   │   │   ├── pipedrive.ts
│   │   │   │   ├── postmark.ts
│   │   │   │   ├── reddit.ts
│   │   │   │   ├── resend.ts
│   │   │   │   ├── roblox.ts
│   │   │   │   ├── salesforce.ts
│   │   │   │   ├── sendgrid.ts
│   │   │   │   ├── simplelogin.ts
│   │   │   │   ├── slack.ts
│   │   │   │   ├── spotify.ts
│   │   │   │   ├── strava.ts
│   │   │   │   ├── threads.ts
│   │   │   │   ├── tiktok.ts
│   │   │   │   ├── todoist.ts
│   │   │   │   ├── trakt.ts
│   │   │   │   ├── twitch.ts
│   │   │   │   ├── twitter.ts
│   │   │   │   ├── united-effects.ts
│   │   │   │   ├── vipps.ts
│   │   │   │   ├── vk.ts
│   │   │   │   ├── webauthn.ts
│   │   │   │   ├── webex.ts
│   │   │   │   ├── wechat.ts
│   │   │   │   ├── wikimedia.ts
│   │   │   │   ├── wordpress.ts
│   │   │   │   ├── workos.ts
│   │   │   │   ├── yandex.ts
│   │   │   │   ├── zitadel.ts
│   │   │   │   ├── zoho.ts
│   │   │   │   └── zoom.ts
│   │   │   ├── types.ts
│   │   │   └── warnings.ts
│   │   ├── test/
│   │   │   ├── actions/
│   │   │   │   ├── callback.test.ts
│   │   │   │   ├── csrf.test.ts
│   │   │   │   └── session.test.ts
│   │   │   ├── assert-config.test.ts
│   │   │   ├── authorize.test.ts
│   │   │   ├── env.test.ts
│   │   │   ├── fixtures/
│   │   │   │   ├── oauth-callback.ts
│   │   │   │   └── pages.ts
│   │   │   ├── jwt.test.ts
│   │   │   ├── memory-adapter.ts
│   │   │   ├── merge.test.ts
│   │   │   ├── pages.test.ts
│   │   │   ├── providers/
│   │   │   │   └── gitlab.test.ts
│   │   │   ├── url-parsing.test.ts
│   │   │   ├── utils.ts
│   │   │   └── webauthn-utils.test.ts
│   │   ├── tsconfig.json
│   │   └── typedoc.config.cjs
│   ├── frameworks-express/
│   │   ├── README.md
│   │   ├── package.json
│   │   ├── src/
│   │   │   ├── adapters.ts
│   │   │   ├── index.ts
│   │   │   └── lib/
│   │   │       ├── http-api-adapters.ts
│   │   │       └── index.ts
│   │   ├── test/
│   │   │   ├── http-api-adapters/
│   │   │   │   ├── request.test.ts
│   │   │   │   └── response.test.ts
│   │   │   ├── login.test.ts
│   │   │   ├── routing.test.ts
│   │   │   └── session.test.ts
│   │   ├── tsconfig.json
│   │   └── typedoc.config.cjs
│   ├── frameworks-qwik/
│   │   ├── README.md
│   │   ├── package.json
│   │   ├── src/
│   │   │   ├── adapters.ts
│   │   │   └── index.ts
│   │   ├── tsconfig.json
│   │   ├── typedoc.config.cjs
│   │   └── vite.config.ts
│   ├── frameworks-solid-start/
│   │   ├── .gitignore
│   │   ├── README.MD
│   │   ├── package.json
│   │   ├── src/
│   │   │   ├── adapters.ts
│   │   │   ├── client.ts
│   │   │   └── index.ts
│   │   ├── test/
│   │   │   └── index.test.ts
│   │   ├── tsconfig.json
│   │   └── typedoc.config.cjs
│   ├── frameworks-sveltekit/
│   │   ├── README.md
│   │   ├── package.json
│   │   ├── playwright.config.ts
│   │   ├── scripts/
│   │   │   └── postbuild.js
│   │   ├── src/
│   │   │   └── lib/
│   │   │       ├── actions.ts
│   │   │       ├── adapters.ts
│   │   │       ├── client.ts
│   │   │       ├── components/
│   │   │       │   ├── SignIn.svelte
│   │   │       │   ├── SignOut.svelte
│   │   │       │   └── index.ts
│   │   │       ├── env.ts
│   │   │       ├── index.ts
│   │   │       ├── types.ts
│   │   │       └── webauthn.ts
│   │   ├── test/
│   │   │   └── index.test.ts
│   │   ├── tsconfig.json
│   │   └── typedoc.config.cjs
│   ├── frameworks-template/
│   │   ├── README.md
│   │   ├── package.json
│   │   ├── src/
│   │   │   └── index.ts
│   │   ├── test/
│   │   │   ├── index.test.ts
│   │   │   └── test-setup.ts
│   │   ├── tsconfig.json
│   │   └── typedoc.config.cjs
│   ├── next-auth/
│   │   ├── README.md
│   │   ├── package.json
│   │   ├── playwright.config.ts
│   │   ├── src/
│   │   │   ├── adapters.ts
│   │   │   ├── index.ts
│   │   │   ├── jwt.ts
│   │   │   ├── lib/
│   │   │   │   ├── actions.ts
│   │   │   │   ├── client.ts
│   │   │   │   ├── env.ts
│   │   │   │   ├── index.ts
│   │   │   │   └── types.ts
│   │   │   ├── middleware.ts
│   │   │   ├── next.ts
│   │   │   ├── react.tsx
│   │   │   └── webauthn.ts
│   │   ├── test/
│   │   │   ├── actions.test.ts
│   │   │   ├── e2e/
│   │   │   │   ├── fixtures/
│   │   │   │   │   ├── auth.ts
│   │   │   │   │   └── webApp.ts
│   │   │   │   ├── helpers/
│   │   │   │   │   └── authTest.ts
│   │   │   │   ├── poms/
│   │   │   │   │   └── keycloakLoginPom.ts
│   │   │   │   └── tests/
│   │   │   │       ├── api/
│   │   │   │       │   └── session.spec.ts
│   │   │   │       └── providers/
│   │   │   │           ├── credentials.spec.ts
│   │   │   │           └── keycloak.spec.ts
│   │   │   └── env.test.ts
│   │   ├── tsconfig.json
│   │   └── typedoc.config.cjs
│   └── utils/
│       ├── adapter.ts
│       ├── package.json
│       ├── scripts/
│       │   ├── providers.js
│       │   └── setup-fw-integration.js
│       ├── tsconfig.eslint.json
│       ├── tsconfig.json
│       ├── vitest-setup.ts
│       └── vitest.config.ts
├── patches/
│   └── @balazsorban__monorepo-release@0.5.1.patch
├── pnpm-workspace.yaml
└── turbo.json

================================================
FILE CONTENTS
================================================

================================================
FILE: .dockerignore
================================================
# Files
/**/*/.env
/**/*/.env.*
/**/*/README.md
/**/*/.git
/**/*/.github
/**/*/.gitignore
/**/*/.dockerignore
/**/*/.turbo
/**/*/npm-debug.log
/**/*/Dockerfile

# Directories
/**/*/node_modules
/**/*/test
/**/*/dist

# Auth.js Dirs
apps/*
docs/**
packages/**
!packages/next-auth
!packages/core
!packages/utils
!apps/examples/nextjs-docker


================================================
FILE: .github/CODEOWNERS
================================================
# Learn how to add code owners here:
# https://help.github.com/en/articles/about-code-owners

*                     @balazsorban44
.github               @ThangHuuVu @ndom91
/apps/                @ubbe-xyz @ndom91 @ThangHuuVu
/docs/                @ubbe-xyz @ndom91
/packages/            @ThangHuuVu
/packages/adapter-*/  @ndom91
/**/*test*            @ubbe-xyz
/**/*type*            @ubbe-xyz


================================================
FILE: .github/DISCUSSION_TEMPLATE/ideas.yml
================================================
body:
  - type: textarea
    attributes:
      label: Goals
      description: Short list of what the feature request aims to address?
      value: |
        1.
        2.
        3.
    validations:
      required: true
  - type: textarea
    attributes:
      label: Non-Goals
      description: Short list of what the feature request _does not_ aim to address?
      value: |
        1.
        2.
        3.
    validations:
      required: false
  - type: textarea
    attributes:
      label: Background
      description: Discuss prior art, why do you think this feature is needed? Are there current alternatives?
    validations:
      required: true
  - type: textarea
    attributes:
      label: Proposal
      description: How should this feature be implemented? Are you interested in contributing?
    validations:
      required: true


================================================
FILE: .github/DISCUSSION_TEMPLATE/questions.yml
================================================
body:
  - type: textarea
    attributes:
      label: Summary
      description: What do you need help with?
    validations:
      required: true
  - type: textarea
    attributes:
      label: Additional information
      description: Any code snippets, error messages, or dependency details that may be related?
      render: js
    validations:
      required: false
  - type: input
    attributes:
      label: Example
      description: A link to a minimal reproduction is helpful for collaborative debugging!
    validations:
      required: false


================================================
FILE: .github/ISSUE_TEMPLATE/1_bug_framework.yml
================================================
name: Bug report
description: Report an issue so we can improve
labels: [triage, bug]
body:
  - type: markdown
    attributes:
      value: |
        **NOTE:** Issues that are potentially security related should be reported to us by following the [Security guidelines](https://next-auth.js.org/security) rather than on GitHub.
        Thanks for taking the time to fill out this issue after reading/searching through the [documentation](https://next-auth.js.org) first!
        Is this your first time contributing? Check out this video: https://www.youtube.com/watch?v=cuoNzXFLitc

        ### Important :exclamation:

        _Providing incorrect/insufficient information or skipping steps to reproduce the issue *will* result in closing the issue or converting to a discussion without further explanation._

        If you have a generic question specific to your project, it is best asked in Discussions under the [Questions category](https://github.com/nextauthjs/next-auth/discussions/new?category=Questions)
  # Let's wait with this until adoption in other frameworks.
  # - type: dropdown
  #   attributes:
  #     label: Framework
  #     description: Which framework(s) is this issue related to?
  #     multiple: true
  #     options:
  #       - "Next.js"
  #       - "Other"
  - type: textarea
    attributes:
      label: Environment
      description: |
        Run this command in your project's root folder and paste the result:

        `npx envinfo --system --binaries --browsers --npmPackages "{next,react,next-auth,@auth/*}"`

        Alternatively, you can manually gather the version information from your package.json for these packages: "next", "react" and "next-auth". Please also mention your OS and Node.js version, as well as the browser you are using.
      value: |
        ```
        Paste here
        ```
    validations:
      required: true
  - type: input
    attributes:
      label: Reproduction URL
      description: A URL to a public github.com repository outside the next-auth org that clearly reproduces your issue. You can use our [`next-auth-example`](https://github.com/nextauthjs/next-auth-example) template repository to get started more easily
    validations:
      required: true
  - type: textarea
    attributes:
      label: Describe the issue
      description: Describe us what the issue is and what have you tried so far to fix it. Add any extra useful information in this section. Feel free to use screenshots (but prefer [code blocks](https://docs.github.com/en/get-started/writing-on-github/working-with-advanced-formatting/creating-and-highlighting-code-blocks#syntax-highlighting) over a picture of your code) or a video explanation.
    validations:
      required: true
  - type: textarea
    attributes:
      label: How to reproduce
      description: Explain with clear steps how to reproduce the issue
    validations:
      required: true
  - type: textarea
    attributes:
      label: Expected behavior
      description: Explain what should have happened instead of what actually happened
    validations:
      required: true


================================================
FILE: .github/ISSUE_TEMPLATE/2_bug_provider.yml
================================================
name: Bug report (Provider)
description: Create a provider-specific report
labels: [triage, bug, providers]
body:
  - type: markdown
    attributes:
      value: |
        **NOTE:** Issues that are potentially security related should be reported to us by following the [Security guidelines](https://next-auth.js.org/security) rather than on GitHub.
        Thanks for taking the time to fill out this [Provider](https://next-auth.js.org/providers/overview) related issue!
        Is this your first time contributing? Check out this video: https://www.youtube.com/watch?v=cuoNzXFLitc

        ### Important :exclamation:

        _Providing incorrect/insufficient information or skipping steps to reproduce the issue *will* result in closing the issue or converting to a discussion without further explanation._

        If you have a generic question specific to your project, it is best asked in Discussions under the [Questions category](https://github.com/nextauthjs/next-auth/discussions/new?category=Questions)
  - type: dropdown
    attributes:
      label: Provider type
      description: Provider(s) this issue is related to
      multiple: true
      options:
        - "Credentials"
        - "Email"
        - "Custom provider"
        - "42 School"
        - "Apple"
        - "Asgardeo"
        - "Atlassian"
        - "Auth0"
        - "Authentik"
        - "Azure Active Directory"
        - "Azure Active Directory B2C"
        - "Azure DevOps"
        - "Battlenet"
        - "Beyond Identity"
        - "Bitbucket"
        - "Box"
        - "Bungie"
        - "ClickUp"
        - "Cognito"
        - "Concept2"
        - "Coinbase"
        - "Descope"
        - "Discord"
        - "Dribbble"
        - "Dropbox"
        - "Eventbrite"
        - "EVE Online"
        - "Facebook"
        - "FACEIT"
        - "Figma"
        - "Foursquare"
        - "Freshbooks"
        - "FusionAuth"
        - "GitHub"
        - "GitLab"
        - "Google"
        - "Hugging Face"
        - "Identity Server 4"
        - "Instagram"
        - "Kakao"
        - "Frontegg"
        - "Keycloak"
        - "Kinde"
        - "Line"
        - "LinkedIn"
        - "Logto"
        - "Loops"
        - "Mailchimp"
        - "Mail.ru"
        - "Mastodon"
        - "Medium"
        - "Microsoft Entra ID"
        - "Naver"
        - "Netlify"
        - "NetSuite"
        - "Nextcloud"
        - "Notion"
        - "Okta"
        - "OneLogin"
        - "Osso"
        - "Osu"
        - "Patreon"
        - "Ping Identity"
        - "Pipedrive"
        - "Reddit"
        - "Roblox"
        - "Salesforce"
        - "SimpleLogin"
        - "Slack"
        - "Spotify"
        - "Strava"
        - "Threads"
        - "Tiktok"
        - "Todoist"
        - "Trakt"
        - "Twitch"
        - "Twitter"
        - "Vk"
        - "Webex"
        - "Wordpress"
        - "WorkOS"
        - "Yandex"
        - "Zoho"
        - "Zoom"
    validations:
      required: true
  - type: textarea
    attributes:
      label: Environment
      description: |
        Run this command in your project's root folder and paste the result:

        `npx envinfo --system --binaries --browsers --npmPackages "{next,react,next-auth,@auth/*}"`

        Alternatively, you can manually gather the version information from your package.json for these packages: "next", "react" and "next-auth". Please also mention your OS and Node.js version, as well as the browser you are using.
      value: |
        ```
        Paste here
        ```
    validations:
      required: true
  - type: input
    attributes:
      label: Reproduction URL
      description: A URL to a public github.com repository outside the next-auth org that clearly reproduces your issue. You can use our [`next-auth-example`](https://github.com/nextauthjs/next-auth-example) template repository to get started more easily
    validations:
      required: true
  - type: textarea
    attributes:
      label: Describe the issue
      description: Describe us what the issue is and what have you tried so far to fix it. Add any extra useful information in this section. Feel free to use screenshots (but prefer [code blocks](https://docs.github.com/en/get-started/writing-on-github/working-with-advanced-formatting/creating-and-highlighting-code-blocks#syntax-highlighting) over a picture of your code) or a video explanation.
    validations:
      required: true
  - type: textarea
    attributes:
      label: How to reproduce
      description: Explain with clear steps how to reproduce the issue
    validations:
      required: true
  - type: textarea
    attributes:
      label: Expected behavior
      description: Explain what should have happened instead of what actually happened
    validations:
      required: true


================================================
FILE: .github/ISSUE_TEMPLATE/3_bug_adapter.yml
================================================
name: Bug report (Adapter)
description: Create an adapter-specific report
labels: [triage, bug, adapters]
body:
  - type: markdown
    attributes:
      value: |
        **NOTE:** Issues that are potentially security related should be reported to us by following the [Security guidelines](https://next-auth.js.org/security) rather than on GitHub.
        Thanks for taking the time to fill out this [Adapter](https://next-auth.js.org/getting-started/adapters) related issue!
        Is this your first time contributing? Check out this video: https://www.youtube.com/watch?v=cuoNzXFLitc

        ### Important :exclamation:

        _Providing incorrect/insufficient information or skipping steps to reproduce the issue *will* result in closing the issue or converting to a discussion without further explanation._

        If you have a generic question specific to your project, it is best asked in Discussions under the [Questions category](https://github.com/nextauthjs/next-auth/discussions/new?category=Questions)
  - type: dropdown
    attributes:
      label: Adapter type
      description: Adapter(s) this issue is related to
      multiple: true
      options:
        - "Custom adapter"
        - "@auth/azure-tables-adapter"
        - "@auth/edgedb-adapter"
        - "@auth/d1-adapter"
        - "@auth/dgraph-adapter"
        - "@auth/drizzle-adapter"
        - "@auth/dynamodb-adapter"
        - "@auth/fauna-adapter"
        - "@auth/firebase-adapter"
        - "@auth/hasura-adapter"
        - "@auth/kysely-adapter"
        - "@auth/mikro-orm-adapter"
        - "@auth/mongodb-adapter"
        - "@auth/neo4j-adapter"
        - "@auth/pg-adapter"
        - "@auth/pouchdb-adapter"
        - "@auth/prisma-adapter"
        - "@auth/sequelize-adapter"
        - "@auth/supabase-adapter"
        - "@auth/surrealdb-adapter"
        - "@auth/typeorm-adapter"
        - "@auth/unstorage-adapter"
        - "@auth/upstash-redis-adapter"
        - "@auth/xata-adapter"
    validations:
      required: true
  - type: textarea
    attributes:
      label: Environment
      description: |
        Run this command in your project's root folder and paste the result:

        `npx envinfo --system --binaries --browsers --npmPackages "{next,react,next-auth,@auth/*}"`

        Alternatively, you can manually gather the version information from your package.json for these packages: "next", "react" and "next-auth". Please also mention your OS and Node.js version, as well as the browser you are using.
      value: |
        ```
        Paste here
        ```
    validations:
      required: true
  - type: input
    attributes:
      label: Reproduction URL
      description: A URL to a public github.com repository outside the next-auth org that clearly reproduces your issue. You can use our [`next-auth-example`](https://github.com/nextauthjs/next-auth-example) template repository to get started more easily
    validations:
      required: true
  - type: textarea
    attributes:
      label: Describe the issue
      description: Describe us what the issue is and what have you tried so far to fix it. Add any extra useful information in this section. Feel free to use screenshots (but prefer [code blocks](https://docs.github.com/en/get-started/writing-on-github/working-with-advanced-formatting/creating-and-highlighting-code-blocks#syntax-highlighting) over a picture of your code) or a video explanation.
    validations:
      required: true
  - type: textarea
    attributes:
      label: How to reproduce
      description: Explain with clear steps how to reproduce the issue
    validations:
      required: true
  - type: textarea
    attributes:
      label: Expected behavior
      description: Explain what should have happened instead of what actually happened
    validations:
      required: true


================================================
FILE: .github/ISSUE_TEMPLATE/4_documentation.yml
================================================
name: "Documentation"
description: Request to update or improve NextAuth.js documentation
labels: ["triage", "documentation"]
body:
  - type: textarea
    attributes:
      label: What is the improvement or update you wish to see?
      description: "Example: The `next-auth` docs are missing information about X."
    validations:
      required: true
  - type: textarea
    attributes:
      label: Is there any context that might help us understand?
      description: A clear description of any added context that might help us understand.
    validations:
      required: true
  - type: input
    attributes:
      label: Does the docs page already exist? Please link to it.
      description: "Example: https://next-auth.js.org/getting-started/introduction"
    validations:
      required: false


================================================
FILE: .github/ISSUE_TEMPLATE/config.yml
================================================
blank_issues_enabled: false
contact_links:
  - name: Get help from the community (Discord)
    url: https://discord.authjs.dev
    about: Ask questions and discuss with other community members
  - name: Ask a question
    url: https://github.com/nextauthjs/next-auth/discussions/new?category=questions
    about: Ask questions and discuss with other community members
  - name: Feature request
    url: https://github.com/nextauthjs/next-auth/discussions/new?category=ideas
    about: Feature requests should be opened as discussions


================================================
FILE: .github/PULL_REQUEST_TEMPLATE.md
================================================
<!--
Thanks for your interest in the project. Bugs filed and PRs submitted are appreciated!

Please fill out the information below to expedite the review and (hopefully)
merge of your pull request!

**NOTE**:

- It's a good idea to open an issue first to discuss potential changes.
- Please make sure that you are _NOT_ opening a PR to fix a potential security vulnerability. Instead, please follow the [Security guidelines](https://github.com/nextauthjs/.github/blob/main/SECURITY.md) to disclose the issue to us confidentially.

-->

## ☕️ Reasoning

<!-- What changes are being made? What feature/bug is being fixed here? -->

## 🧢 Checklist

- [ ] Documentation
- [ ] Tests
- [ ] Ready to be merged

## 🎫 Affected issues

<!--
Please [scout and link issues](https://github.com/nextauthjs/next-auth/issues) that might be solved by this PR. And include text like the following to close them automatically when this is merged:

Fixes: INSERT_ISSUE_LINK_HERE
-->

## 📌 Resources

- [Security guidelines](https://github.com/nextauthjs/.github/blob/main/SECURITY.md)
- [Contributing guidelines](https://github.com/nextauthjs/.github/blob/main/CONTRIBUTING.md)
- [Code of conduct](https://github.com/nextauthjs/.github/blob/main/CODE_OF_CONDUCT.md)
- [Contributing to Open Source](https://kcd.im/pull-request)


================================================
FILE: .github/broken-link-checker/action.yml
================================================
name: "Broken Link Checker"
description: "Recursively checks input URL for broken links"
outputs:
  version:
    description: "Check for broken internal links"
runs:
  using: "node20"
  main: "dist/index.js"


================================================
FILE: .github/broken-link-checker/index.d.ts
================================================
declare module "broken-link-checker";


================================================
FILE: .github/broken-link-checker/package.json
================================================
{
  "name": "broken-link-checker",
  "private": true,
  "version": "0.2.0",
  "description": "Find broken links as a GitHub Action",
  "main": "dist/index.js",
  "type": "module",
  "scripts": {
    "dev": "tsx src/index.ts",
    "build": "npx tsup --clean --minify --format esm src/index.ts",
    "types": "tsc"
  },
  "keywords": [
    "typescript",
    "broken-link-checker",
    "github-action"
  ],
  "author": "ndom91 <yo@ndo.dev> (https://ndo.dev/)",
  "license": "MIT",
  "devDependencies": {
    "@types/node": "^20.11.15",
    "tsup": "^8.0.1",
    "tsx": "^4.7.0",
    "typescript": "^5.3.3"
  },
  "dependencies": {
    "@actions/core": "^1.10.1",
    "@actions/github": "^6.0.0",
    "broken-link-checker": "^0.7.8"
  }
}


================================================
FILE: .github/broken-link-checker/src/index.ts
================================================
import blc from "broken-link-checker"
import { setFailed } from "@actions/core"
import * as github from "@actions/github"

type TODO = any
type Output = {
  errors: any[]
  links: any[]
  pages: any[]
  sites: any[]
}
type Comment = {
  id: number
}
type FindBotComment = {
  octokit: TODO
  owner: string
  repo: string
  prNumber: number
}

const COMMENT_TAG = "# Broken Link Checker"

async function findBotComment({
  octokit,
  owner,
  repo,
  prNumber,
}: FindBotComment): Promise<Comment | undefined> {
  try {
    const { data: comments } = await octokit.rest.issues.listComments({
      owner,
      repo,
      issue_number: prNumber,
    })

    return comments.find((c: TODO) => c.body?.includes(COMMENT_TAG))
  } catch (error) {
    setFailed("Error finding bot comment: " + error)
    return undefined
  }
}

async function updateCheckStatus(
  brokenLinkCount: number,
  commentUrl?: string
): Promise<void> {
  const checkName = "Broken Link Checker"
  const summary = `Found ${brokenLinkCount} broken links in this PR. Click details for a list.`
  const text = `[See the comment for details](${commentUrl})`
  const { context, getOctokit } = github
  const octokit = getOctokit(process.env.GITHUB_TOKEN!)
  const { owner, repo } = context.repo

  // Can only update status on 'pull_request' events
  if (context.payload.pull_request) {
    const pullRequest = context.payload.pull_request
    const sha = pullRequest?.head.sha

    const checkParams = {
      owner,
      repo,
      name: checkName,
      head_sha: sha,
      status: "completed" as const,
      conclusion: "failure" as const,
      output: {
        title: checkName,
        summary: summary,
        text: text,
      },
    }

    try {
      await octokit.rest.checks.create(checkParams)
    } catch (error) {
      setFailed("Failed to create check: " + error)
    }
  }
}

const postComment = async (
  outputMd: string,
  brokenLinkCount: number = 0
): Promise<string> => {
  try {
    const { context, getOctokit } = github
    const octokit = getOctokit(process.env.GITHUB_TOKEN!)
    const { owner, repo } = context.repo
    let prNumber

    // Handle various trigger events
    if (context.payload.pull_request) {
      // Triggered by `pull_request`
      prNumber = context.payload.pull_request?.number
    } else if (context.payload.issue) {
      // Triggered by `issue_comment`
      prNumber = context.payload?.issue?.number
    }

    if (!prNumber) {
      setFailed("Count not find PR Number")
      return ""
    }

    const botComment = await findBotComment({
      octokit,
      owner,
      repo,
      prNumber,
    })
    if (botComment) {
      console.log("Updating Comment")
      const { data } = await octokit.rest.issues.updateComment({
        owner,
        repo,
        comment_id: botComment?.id,
        body: outputMd,
      })

      return data.html_url
    } else if (brokenLinkCount > 0) {
      console.log("Creating Comment")
      const { data } = await octokit.rest.issues.createComment({
        owner,
        repo,
        issue_number: prNumber,
        body: outputMd,
      })
      return data.html_url
    }
    return ""
  } catch (error) {
    setFailed("Error commenting: " + error)
    return ""
  }
}

const generateOutputMd = (output: Output): string => {
  // Add comment header
  let outputMd = `${COMMENT_TAG}

> **${output.links.length}** broken links found. Links organised below by source page, or page where they were found.
`

  // Build map of page and array of its found broken links
  const linksByPage = output.links.reduce((acc, link) => {
    if (!acc[link.base.resolved]) {
      acc[link.base.resolved] = []
      acc[link.base.resolved].push(link)
    } else {
      acc[link.base.resolved].push(link)
    }
    return acc
  }, {})

  // Write out markdown tables of these links
  Object.entries(linksByPage).forEach(([page, links], i) => {
    outputMd += `

### ${i + 1}) [${new URL(page).pathname}](${page})

| Target Link | Link Text  |
|------|------|
`

    // @ts-expect-error
    links.forEach((link: TODO) => {
      outputMd += `| [${new URL(link.url.resolved).pathname}](${
        link.url.resolved
      }) | "${link.html?.text?.trim().replaceAll("\n", "")}" |
`
    })
  })

  // If there were scrape errors, append to bottom of comment
  if (output.errors.length) {
    outputMd += `
### Errors
`
    output.errors.forEach((error) => {
      outputMd += `
${error}
`
    })
  }

  return outputMd
}

// Main function that triggers link validation across .mdx files
async function brokenLinkChecker(): Promise<void> {
  if (!process.env.GITHUB_TOKEN) {
    throw new Error("GITHUB_TOKEN is required")
  }
  const siteUrl =
    process.env.VERCEL_PREVIEW_URL || "https://authjs-nextra-docs.vercel.app"
  const output: Output = {
    errors: [],
    links: [],
    pages: [],
    sites: [],
  }

  const options = {
    excludeExternalLinks: true,
    honorRobotExclusions: false,
    filterLevel: 0,
    excludedKeywords: [],
  }

  const siteChecker = new blc.SiteChecker(options, {
    error: (error: TODO) => {
      output.errors.push(error)
    },
    link: (result: TODO) => {
      if (result.broken) {
        output.links.push(result)
      }
    },
    end: async () => {
      if (output.links.length) {
        // DEBUG
        // console.debug(output.links)

        // Skip links that returned 308
        const brokenLinksForAttention = output.links.filter(
          (link) => link.broken && !["HTTP_308"].includes(link.brokenReason)
        )

        const outputMd = generateOutputMd({
          errors: output.errors,
          links: brokenLinksForAttention,
          pages: [],
          sites: [],
        })
        const commentUrl = await postComment(
          outputMd,
          brokenLinksForAttention.length
        )

        // Update GitHub "check" status
        await updateCheckStatus(brokenLinksForAttention.length, commentUrl)

        brokenLinksForAttention.length && setFailed(`Found broken links`)
      }
    },
  })

  siteChecker.enqueue(siteUrl)
}

brokenLinkChecker()


================================================
FILE: .github/broken-link-checker/tsconfig.json
================================================
{
  "compilerOptions": {
    "noEmit": true,
    "target": "esnext",
    "moduleResolution": "node",
    "rootDir": "./src",
    "types": ["./index.d.ts", "node"],
    "strict": true,
    "noImplicitAny": true,
    "allowSyntheticDefaultImports": true
  }
}


================================================
FILE: .github/dependabot.yml
================================================
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for all configuration options:
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates

version: 2
updates:
  - package-ecosystem: "npm" # See documentation for possible values
    directory: "/" # Location of package manifests
    schedule:
      interval: "weekly"
    versioning-strategy: "increase"
    allow:
      - dependency-name: "oauth4webapi"
      - dependency-name: "jose"


================================================
FILE: .github/good-first-issue.md
================================================
This issue was marked with the `good first issue` label by a maintainer.

This means that it is a good candidate for someone interested in contributing to the project, but does not know where to start.

Have a look at the [Contributing Guide](https://github.com/nextauthjs/.github/blob/main/CONTRIBUTING.md) first.

This will help you set up your development environment to get started. When you are ready, open a PR, and link back to this issue in the form of adding `Fixes #1234` to the PR description, where `1234` is the issue number. This will auto-close the issue when the PR gets merged, making it easier for us to keep track of what has been fixed.

Please make sure that - if applicable - you add tests for the changes you make.

If you have any questions, feel free to ask in the comments below or the PR. Generally, you don't need to `@mention` anyone directly, as we will get notified anyway and will respond as soon as we can)

> [!NOTE]  
> There is no need to ask for permission "can I work on this?" Please, go ahead if there is no linked PR :slightly_smiling_face:


================================================
FILE: .github/help-needed.md
================================================
This issue was marked with the `help needed` label by a maintainer.

The issue might require some digging, so it is recommended to have some experience with the project.

Have a look at the [Contributing Guide](https://github.com/nextauthjs/.github/blob/main/CONTRIBUTING.md) first.

This will help you set up your development environment to get started. When you are ready, open a PR, and link back to this issue in the form of adding `Fixes #1234` to the PR description, where `1234` is the issue number. This will auto-close the issue when the PR gets merged, making it easier for us to keep track of what has been fixed.

Please make sure that - if applicable - you add tests for the changes you make.

If you have any questions, feel free to ask in the comments below or the PR. Generally, you don't need to `@mention` anyone directly, as we will get notified anyway and will respond as soon as we can)

> [!NOTE]  
> There is no need to ask for permission "can I work on this?" Please, go ahead if there is no linked PR :slightly_smiling_face:


================================================
FILE: .github/invalid-reproduction.md
================================================
We could not detect a valid reproduction link. **Make sure to follow the bug report template carefully.**

### Why was this issue closed?

To be able to investigate, we need access to a reproduction to identify what triggered the issue. We need a link to a **public** GitHub repository. Example: ([NextAuth.js example repository](https://github.com/nextauthjs/next-auth-example)).

The bug template that you filled out has a section called "Reproduction URL", which is where you should provide the link to the reproduction.

- If you did not provide a link or the link you provided is not hosted on github.com outside of the next-auth organization, we will close the issue.
- If you provide a link to a private repository, we will close the issue.
- If you provide a link to a repository but not in the correct section, we will close the issue.

### What should I do?

Depending on the reason the issue was closed, you can do the following:

- If you did not provide a link hosted on github.com outside of the next-auth organization, please open a new issue with a link to such a reproduction.
- If you provided a link to a private repository, please open a new issue with a link to a public repository.
- If you provided a link to a repository but not in the correct section, please open a new issue with a link to a reproduction in the correct section.

**In general, assume that we should not go through a lengthy onboarding process at your company code only to be able to verify an issue.**

### My repository is private and cannot make it public

In most cases, a private repo will not be a sufficient **minimal reproduction**, as this codebase might contain a lot of unrelated parts that would make our investigation take longer. Please do **not** make it public. Instead, create a new repository using the templates above, adding the relevant code to reproduce the issue. Common things to look out for:

- Remove any code that is not related to the issue. (pages, API Routes, components, etc.)
- Remove any dependencies that are not related to the issue.
- Remove any third-party service that would require us to sign up for an account to reproduce the issue.
- Remove any environment variables that are not related to the issue.
- Remove private packages that we do not have access to.
- If the issue is not related to a monorepo specifically, try to reproduce the issue without a complex monorepo setup

### I did not open this issue, but it is relevant to me, what can I do to help?

Anyone experiencing the same issue is welcome to provide a minimal reproduction following the above steps by opening a new issue.

### I think my reproduction is good enough, why aren't you looking into it quickly?

We look into every issue and monitor open issues for new comments.

However, sometimes we might miss a few due to the popularity/high traffic of the repository. We apologize, and kindly ask you to refrain from tagging core maintainers, as that will usually not result in increased priority.

Upvoting issues to show your interest will help us prioritize and address them as quickly as possible. That said, every issue is important to us, and if an issue gets closed by accident, we encourage you to open a new one linking to the old issue and we will look into it.

### Useful Resources

- [How to create a Minimal, Complete, and Verifiable example](https://stackoverflow.com/help/mcve)
- [Bug report: Framework](https://github.com/nextauthjs/next-auth/issues/new?assignees=&labels=triage&projects=&template=1_bug_framework.yml)
- [Bug report: Provider](https://github.com/nextauthjs/next-auth/issues/new?assignees=&labels=triage%2Cproviders&projects=&template=2_bug_provider.yml)
- [Bug report: Adapter](https://github.com/nextauthjs/next-auth/issues/new?assignees=&labels=triage%2Cadapters&projects=&template=3_bug_adapter.yml)


================================================
FILE: .github/pr-labeler.yml
================================================
# https://github.com/actions/labeler#create-githublabeleryml
adapters: ["packages/core/src/adapters.ts", "packages/adapter-*/**/*"]
core: ["packages/core/src/**/*"]
azure-tables: ["packages/adapter-azure-tables/**/*"]
edgedb: ["packages/adapter-edgedb/**/*"]
d1: ["packages/adapter-d1/**/*"]
dgraph: ["packages/adapter-dgraph/**/*"]
drizzle: ["packages/adapter-drizzle/**/*"]
documentation: ["packages/docs/docs/**/*"]
dynamodb: ["packages/adapter-dynamodb/**/*"]
examples: ["apps/examples/**/*"]
express: ["packages/frameworks-express/**/*"]
fauna: ["packages/adapter-fauna/**/*"]
firebase: ["packages/adapter-firebase/**/*"]
hasura: ["packages/adapter-hasura/**/*"]
frameworks: ["packages/frameworks-*/**/*"]
mikro-orm: ["packages/adapter-mikro-orm/**/*"]
mongodb: ["packages/adapter-mongodb/**/*"]
neo4j: ["packages/adapter-neo4j/**/*"]
next-auth: ["packages/next-auth/**/*"]
pg: ["packages/adapter-pg/**/*"]
neon: ["packages/adapter-neon/**/*"]
playgrounds: ["apps/playgrounds/**/*"]
pouchdb: ["packages/adapter-pouchdb/**/*"]
prisma: ["packages/adapter-prisma/**/*"]
kysely: ["packages/adapter-kysely/**/*"]
providers: ["packages/core/src/providers/**/*"]
sequelize: ["packages/adapter-sequelize/**/*"]
solidjs: ["packages/frameworks-solid-start/**/*"]
supabase: ["packages/adapter-supabase/**/*"]
surrealdb: ["packages/adapter-surrealdb/**/*"]
svelte: ["packages/frameworks-sveltekit/**/*"]
test: ["**test**/*"]
typeorm: ["packages/adapter-typeorm/**/*"]
unstorage: ["packages/adapter-unstorage/**/*"]
upstash-redis: ["packages/adapter-upstash-redis/**/*"]
xata: ["packages/adapter-xata/**/*"]


================================================
FILE: .github/stale.yml
================================================
# https://github.com/probot/stale#usage

daysUntilStale: 60
daysUntilClose: 7
exemptLabels:
  - pinned
  - security
  - priority
  - bug
  - triage
  - accepted
staleLabel: stale
only: issues
markComment: >
  It looks like this issue did not receive any activity for 60 days.
  It will be closed in 7 days if no further activity occurs. If you think your issue
  is still relevant, commenting will keep it open. Thanks!
closeComment: >
  To keep things tidy, we are closing this issue for now.
  If you think your issue is still relevant, leave a comment
  and we might reopen it. Thanks!


================================================
FILE: .github/sync.yml
================================================
nextauthjs/express-auth-example:
  - source: apps/examples/express
    dest: .
    deleteOrphaned: true
  - .github/FUNDING.yml
  - LICENSE

nextauthjs/sveltekit-auth-example:
  - source: apps/examples/sveltekit
    dest: .
    deleteOrphaned: true
  - .github/FUNDING.yml
  - LICENSE

nextauthjs/solid-start-auth-example:
  - source: "apps/examples/solid-start"
    dest: .
    deleteOrphaned: true
  - .github/FUNDING.yml
  - LICENSE

nextauthjs/next-auth-example:
  - source: apps/examples/nextjs
    dest: .
    deleteOrphaned: true
  - .github/FUNDING.yml
  - LICENSE

nextauthjs/next-auth-pages-example:
  - source: apps/examples/nextjs-pages
    dest: .
    deleteOrphaned: true
  - .github/FUNDING.yml
  - LICENSE

nextauthjs/qwik-auth-example:
  - source: apps/examples/qwik
    dest: .
    deleteOrphaned: true
  - .github/FUNDING.yml
  - LICENSE


================================================
FILE: .github/version-pr/action.yml
================================================
name: "Determine version"
description: "Determines npm package version based on PR number and commit SHA"
outputs:
  version:
    description: "npm package version"
runs:
  using: "node20"
  main: "index.js"


================================================
FILE: .github/version-pr/index.js
================================================
const fs = require("fs")
const path = require("path")
const core = require("@actions/core")

try {
  const packageJSONPath = path.join(
    process.cwd(),
    `packages/${process.env.PACKAGE_PATH || "next-auth"}/package.json`
  )
  const packageJSON = JSON.parse(fs.readFileSync(packageJSONPath, "utf8"))

  const sha8 = process.env.GITHUB_SHA.substring(0, 8)
  const prefix = "0.0.0-"
  const pr = process.env.PR_NUMBER
  const source = pr ? `pr.${pr}` : "manual"
  const packageVersion = `${prefix}${source}.${sha8}`
  packageJSON.version = packageVersion
  core.setOutput("version", packageVersion)
  fs.writeFileSync(packageJSONPath, JSON.stringify(packageJSON))
} catch (error) {
  core.setFailed(error.message)
}


================================================
FILE: .github/workflows/broken-link-checker.yml
================================================
name: "Broken Link Checker"

on:
  issue_comment:
    types: [edited]

permissions:
  pull-requests: write
  checks: write

jobs:
  broken-link-checker:
    runs-on: ubuntu-latest
    if: github.actor == 'vercel[bot]'
    steps:
      - uses: actions/checkout@v4
      - uses: actions/setup-node@v4
      - run: corepack enable
      - uses: aaimio/vercel-preview-url-action@v2.2.0
        id: vercel_preview_url
        with:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
          preview_url_regexp: https.*\/(.*-authjs.vercel.app)
      - name: Install dependencies
        run: cd ./.github/broken-link-checker && pnpm install --ignore-workspace && pnpm build
      - name: Run link checker
        uses: ./.github/broken-link-checker
        id: broken-links
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
          VERCEL_PREVIEW_URL: https://${{ steps.vercel_preview_url.outputs.vercel_preview_url }}


================================================
FILE: .github/workflows/codeql-analysis.yml
================================================
name: Code Analysis

on:
  push:
    branches: [beta, next]
  pull_request:
    branches: [main]
  schedule:
    - cron: "43 17 * * 2"

jobs:
  analyze:
    name: Verify
    runs-on: ubuntu-latest
    strategy:
      fail-fast: false
      matrix:
        language: ["javascript"]
    steps:
      - name: Checkout repository
        uses: actions/checkout@v3
      - name: Initialize CodeQL
        uses: github/codeql-action/init@v2
        with:
          languages: ${{ matrix.language }}
      - name: Perform CodeQL Analysis
        uses: github/codeql-action/analyze@v2


================================================
FILE: .github/workflows/pr-labeler.yml
================================================
# https://github.com/actions/labeler#create-workflow

name: Label Pull Requests

on:
  pull_request_target:

jobs:
  prs:
    name: Triage
    runs-on: ubuntu-latest
    steps:
      - uses: actions/labeler@v4
        with:
          repo-token: "${{ secrets.GITHUB_TOKEN }}"
          configuration-path: ".github/pr-labeler.yml"


================================================
FILE: .github/workflows/release.yml
================================================
name: Release

on:
  push:
    branches:
      - main
      - beta
      - next
      - 3.x
  pull_request:
  merge_group:
  # TODO: Support latest releases
  workflow_dispatch:
    inputs:
      name:
        type: choice
        description: Package name (npm)
        options:
          - "next-auth"
          - "@auth/core"
          - "@auth/express"
          - "@auth/nuxt"
          - "@auth/qwik"
          - "@auth/solid-start"
          - "@auth/sveltekit"
          - "@auth/azure-tables-adapter"
          - "@auth/d1-adapter"
          - "@auth/dgraph-adapter"
          - "@auth/drizzle-adapter"
          - "@auth/dynamodb-adapter"
          - "@auth/edgedb-adapter"
          - "@auth/fauna-adapter"
          - "@auth/firebase-adapter"
          - "@auth/hasura-adapter"
          - "@auth/kysely-adapter"
          - "@auth/mikro-orm-adapter"
          - "@auth/mongodb-adapter"
          - "@auth/neo4j-adapter"
          - "@auth/pg-adapter"
          - "@auth/pouchdb-adapter"
          - "@auth/prisma-adapter"
          - "@auth/sequelize-adapter"
          - "@auth/supabase-adapter"
          - "@auth/surrealdb-adapter"
          - "@auth/test-adapter"
          - "@auth/typeorm-adapter"
          - "@auth/typeorm-legacy-adapter"
          - "@auth/unstorage-adapter"
          - "@auth/upstash-redis-adapter"
          - "@auth/xata-adapter"
permissions:
  id-token: write

env:
  TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}
  TURBO_TEAM: ${{ vars.TURBO_TEAM }}
  FORCE_COLOR: true
  NPM_CONFIG_PROVENANCE: true

jobs:
  test:
    name: Test
    runs-on: ubuntu-22.04
    steps:
      - name: Init
        uses: actions/checkout@v4
        with:
          fetch-depth: 0
      - name: Install pnpm
        uses: pnpm/action-setup@v4
      - name: Setup Node
        uses: actions/setup-node@v4
        with:
          node-version-file: ".nvmrc"
          cache: "pnpm"
      - name: Install dependencies
        run: pnpm install
      - name: Peek
        run: pnpm peek
        if: ${{ github.repository == 'nextauthjs/next-auth' && github.event_name == 'push' && github.ref == 'refs/heads/main' }}
      - name: Get base commit SHA from main
        id: get_base_sha
        run: echo "BASE_SHA=$(git merge-base origin/main HEAD)" >> $GITHUB_ENV
      - name: Check for changes under /packages
        id: check-packages
        run: |
          if git diff --name-only ${{ env.BASE_SHA }}...HEAD | grep '^packages/'; then
            echo "PACKAGES_CHANGES=true" >> $GITHUB_ENV
          else
            echo "PACKAGES_CHANGES=false" >> $GITHUB_ENV
          fi
      - name: Build
        if: ${{ env.PACKAGES_CHANGES == 'true' || github.ref == 'refs/heads/main' }}
        run: pnpm build
      - name: Check formatting
        run: pnpm format
        timeout-minutes: 15
      - name: Run unit tests
        if: ${{ env.PACKAGES_CHANGES == 'true' || github.ref == 'refs/heads/main' }}
        run: pnpm test
      - name: Install Playwright
        if: github.repository == 'nextauthjs/next-auth'
        run: pnpm exec playwright install --with-deps chromium
      - name: Run E2E tests (Nextjs-Docker)
        continue-on-error: true
        if: false
        timeout-minutes: 15
        run: cd apps/examples/nextjs-docker && pnpm test:docker
      - name: Run E2E tests
        continue-on-error: true # TODO: Make this less flakey
        if: ${{ env.PACKAGES_CHANGES == 'true' || github.ref == 'refs/heads/main' }}
        timeout-minutes: 15
        env:
          AUTH_SECRET: ${{ secrets.AUTH_SECRET }}
          TEST_KEYCLOAK_USERNAME: ${{ secrets.TEST_KEYCLOAK_USERNAME }}
          TEST_KEYCLOAK_PASSWORD: ${{ secrets.TEST_KEYCLOAK_PASSWORD }}
          AUTH_KEYCLOAK_ID: ${{ secrets.AUTH_KEYCLOAK_ID }}
          AUTH_KEYCLOAK_SECRET: ${{ secrets.AUTH_KEYCLOAK_SECRET }}
          AUTH_KEYCLOAK_ISSUER: ${{ secrets.AUTH_KEYCLOAK_ISSUER }}
          AUTH_TRUST_HOST: 1
          DEBUG: "pw:webserver"
        run: pnpm test:e2e
      - uses: actions/upload-artifact@v4
        name: Upload Playwright artifacts
        with:
          name: playwright-traces
          path: "**/packages/next-auth/test-results/*/trace.zip"
          retention-days: 7
      - uses: codecov/codecov-action@v4
        if: always()
        name: Coverage
        with:
          token: ${{ secrets.CODECOV_TOKEN }}

  release-branch:
    name: Publish branch
    timeout-minutes: 120
    runs-on: ubuntu-latest
    needs: test
    if: ${{ github.event_name == 'push' }}
    environment: Production
    steps:
      - name: Init
        uses: actions/checkout@v4
        with:
          fetch-depth: 0
          # Please upvote https://github.com/orgs/community/discussions/13836
          token: ${{ secrets.GH_PAT }}
      - name: Install pnpm
        uses: pnpm/action-setup@v4
      - name: Setup Node
        uses: actions/setup-node@v4
        with:
          node-version-file: ".nvmrc"
          cache: "pnpm"
      - name: Install dependencies
        run: pnpm install
      - name: Publish to npm and GitHub
        run: pnpm release
        env:
          # Please upvote https://github.com/orgs/community/discussions/13836
          GITHUB_TOKEN: ${{ secrets.GH_PAT }}
          NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
  release-pr:
    name: Publish PR
    timeout-minutes: 120
    runs-on: ubuntu-latest
    needs: test
    if: ${{ github.event_name == 'pull_request' }}
    environment: Preview
    steps:
      - name: Init
        uses: actions/checkout@v4
      - name: Install pnpm
        uses: pnpm/action-setup@v4
      - name: Setup Node
        uses: actions/setup-node@v4
        with:
          node-version-file: ".nvmrc"
          cache: "pnpm"
      - name: Install dependencies
        run: pnpm install
      - name: Determine version
        uses: ./.github/version-pr
        id: determine-version
        env:
          PR_NUMBER: ${{ github.event.number }}
      - name: Publish to npm
        run: |
          cd packages/core
          echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" >> .npmrc
          pnpm publish --no-git-checks --access public --tag experimental
        env:
          NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
      - name: Comment version on PR
        uses: NejcZdovc/comment-pr@v2
        with:
          message:
            "🎉 Experimental release [published 📦️ on npm](https://npmjs.com/package/@auth/core/v/${{ env.VERSION }})!\n \
            ```sh\npnpm add @auth/core@${{ env.VERSION }}\n```\n \
            ```sh\nyarn add @auth/core@${{ env.VERSION }}\n```\n \
            ```sh\nnpm i @auth/core@${{ env.VERSION }}\n```"
        env:
          VERSION: ${{ steps.determine-version.outputs.version }}
          GITHUB_TOKEN: ${{ secrets.GH_PAT }}
  release-manual:
    name: Publish manually
    runs-on: ubuntu-latest
    if: ${{ github.event_name == 'workflow_dispatch' }}
    steps:
      - name: Init
        uses: actions/checkout@v4
      - name: Install pnpm
        uses: pnpm/action-setup@v4
      - name: Setup Node
        uses: actions/setup-node@v4
        with:
          node-version-file: ".nvmrc"
          cache: "pnpm"
      - name: Install dependencies
        run: pnpm install
      - name: Map package name to path
        run: |
          case "${{ github.event.inputs.name }}" in
            *"-adapter")
              adapter_name=$(echo "${{ github.event.inputs.name }}" | sed 's/@auth\///' | sed 's/-adapter//')
              echo "PACKAGE_PATH=adapter-${adapter_name}" >> $GITHUB_ENV
              ;;
            "next-auth")
              echo "PACKAGE_PATH=next-auth" >> $GITHUB_ENV
              ;;
            "@auth/core")
              echo "PACKAGE_PATH=core" >> $GITHUB_ENV
              ;;
            *)
              framework_name=$(echo "${{ github.event.inputs.name }}" | sed 's/@auth\///')
              echo "PACKAGE_PATH=frameworks-${framework_name}" >> $GITHUB_ENV
              ;;
          esac
      - name: Determine version
        uses: ./.github/version-pr
        id: determine-version
        env:
          PACKAGE_PATH: ${{ env.PACKAGE_PATH }}
      - name: Publish to npm
        run: |
          pnpm build
          cd packages/$PACKAGE_PATH
          echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" >> .npmrc
          pnpm publish --no-git-checks --access public --tag experimental
          echo "🎉 Experimental release published 📦️ on npm: https://npmjs.com/package/${{ github.event.inputs.name }}/v/${{ env.VERSION }}"
          echo "Install via: pnpm add ${{ github.event.inputs.name }}@${{ env.VERSION }}"
        env:
          NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
          PACKAGE_PATH: ${{ env.PACKAGE_PATH }}
          VERSION: ${{ steps.determine-version.outputs.version }}


================================================
FILE: .github/workflows/sync-examples.yml
================================================
name: Sync Example Repositories
on:
  push:
    branches:
      - main
  workflow_dispatch:
jobs:
  sync:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout Repository
        uses: actions/checkout@v3
      - name: Run GitHub File Sync
        uses: balazsorban44/repo-file-sync-action@master
        with:
          GH_PAT: ${{ secrets.GH_PAT }}
          IS_FINE_GRAINED: true
          SKIP_PR: true
          ORIGINAL_MESSAGE: true


================================================
FILE: .github/workflows/triage.yml
================================================
name: Triage issue
on:
  issues:
    types: [labeled, opened]
  issue_comment:
    types: [created]

env:
  GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

permissions:
  issues: write

jobs:
  triage:
    runs-on: ubuntu-latest
    steps:
      - name: Nissuer
        uses: balazsorban44/nissuer@1.9.2
        with:
          label-area-prefix: ""
          label-area-section: "[Provider|Adapter] type(.*)### Environment"
          label-comments: '{ "incomplete": ".github/invalid-reproduction.md", "good first issue": ".github/good-first-issue.md", "help needed": ".github/help-needed.md" }'
          reproduction-link-section: "### Reproduction URL(.*)### Describe the issue"
          reproduction-invalid-label: "invalid reproduction"
          reproduction-issue-labels: "bug,"
          reproduction-blocklist: "github.com/nextauthjs.*"


================================================
FILE: .gitignore
================================================
# Misc
.DS_Store
.eslintcache
.env
.env.local
.env.development.local
.env.test.local
.env.production.local
packages/*/.npmrc


npm-debug.log*
yarn-debug.log*
yarn-error.log*
firebase-debug.log
ui-debug.log
.pnpm-debug.log
.husky
tmp

# Dependencies
node_modules

# Build dirs
.next
build
dist

# Generated files
.cache-loader
packages/next-auth/providers
# copied from @auth/core
packages/frameworks-*/**/providers
packages/*/*.js
!packages/*/typedoc.config.js
packages/*/*.d.ts
packages/*/*.d.ts.map
packages/*/lib
packages/**/generated
.xata*

# Qwik needs to use .mjs. REVIEW: Check back, can we just use .js?
packages/*/*.mjs

# Development app
apps/dev/src/css
apps/dev/prisma/migrations
apps/dev/typeorm
apps/dev/nextjs-2

# VS
/.vs/slnx.sqlite-journal
/.vs/slnx.sqlite
/.vs
.vscode/generated*

# Jetbrains
.idea

# GitHub Actions runner
/actions-runner
/_work

# DB
dev.db*
packages/adapter-prisma/prisma/dev.db
packages/adapter-prisma/prisma/migrations
db.sqlite
packages/adapter-supabase/supabase/.branches
packages/adapter-drizzle/.drizzle

# Tests
coverage
dynamodblocal-bin
firestore-debug.log
test.schema.gql
test-results
playwright-report
blob-report
playwright/.cache


# Turborepo
.turbo

# Docs
docs/.next
docs/manifest.mjs

# Core
packages/core/src/providers/provider-types.ts
packages/core/lib
packages/core/providers
packages/core/src/lib/pages/styles.ts
docs/docs/reference/core

# Next.js
packages/next-auth/lib
packages/next-auth/providers
# copied from @auth/core
packages/next-auth/src/providers
docs/docs/reference/nextjs

# SvelteKit
packages/frameworks-sveltekit/index.*
packages/frameworks-sveltekit/client.*
packages/frameworks-sveltekit/.svelte-kit
packages/frameworks-sveltekit/package
packages/frameworks-sveltekit/vite.config.js.timestamp-*
packages/frameworks-sveltekit/vite.config.ts.timestamp-*
docs/docs/reference/sveltekit

# SolidStart
docs/docs/reference/solidstart


# Express
docs/docs/reference/express


# Adapters
docs/docs/reference/adapter

## Drizzle migration folder
.drizzle


================================================
FILE: .nvmrc
================================================
22

================================================
FILE: .prettierignore
================================================
.prettierignore
.cache-loader
.DS_Store
.pnpm-debug.log
.turbo
.vscode/generated*
/_work
/actions-runner
node_modules
patches
pnpm-lock.yaml
.github/actions/issue-validator/index.mjs
*.d.ts
*.d.ts.map
**/*.sh

.svelte-kit
.next
.nuxt

# --------------- Docs ---------------

.next
docs/pages/reference
static
docs/manifest.mjs

# --------------- Packages ---------------

coverage
dist
packages/**/*.cjs
packages/**/*.js
!packages/*/scripts/*.js

# @auth/core
packages/core/src/providers/provider-types.ts
packages/core/src/lib/pages/styles.ts

# @auth/sveltekit
packages/frameworks-sveltekit/package
packages/frameworks-sveltekit/vite.config.{js,ts}.timestamp-*

# @auth/express
packages/frameworks-express/providers

# next-auth
packages/next-auth/src/providers/provider-types.ts
packages/next-auth/css/index.css

# Adapters
.branches
db.sqlite
dev.db
dynamodblocal-bin
firebase-debug.log
firestore-debug.log
migrations
test.schema.gql

# --------------- Apps ---------------

# Examples should have their own Prettier config since they are templates too
apps/example-sveltekit

# Development app
apps/dev/prisma
apps/dev/migrations
apps/dev/typeorm


================================================
FILE: .vscode/extensions.json
================================================
{
  "recommendations": ["esbenp.prettier-vscode", "bradlc.vscode-tailwindcss"]
}


================================================
FILE: .vscode/settings.json
================================================
{
  "typescript.tsdk": "node_modules/typescript/lib",
  "openInGitHub.remote.branch": "main",
  "typescript.preferences.importModuleSpecifierEnding": "js",
  "editor.formatOnSave": true,
  "editor.defaultFormatter": "esbenp.prettier-vscode"
}


================================================
FILE: .vscode/snippets.code-snippets
================================================
{
  "oauth2-spec": {
    "description": "Markdown link to OAuth 2 specification",
    "scope": "typescript",
    "prefix": "oauth2",
    "body": ["[OAuth 2](https://datatracker.ietf.org/doc/html/rfc6749)"],
  },
  "oidc-spec": {
    "description": "Markdown link to OpenID Connect specification",
    "scope": "typescript",
    "prefix": "oidc",
    "body": ["[OIDC](https://openid.net/specs/openid-connect-core-1_0.html)"],
  },
}


================================================
FILE: LICENSE
================================================
ISC License

Copyright (c) 2022-2024, Balázs Orbán

Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted, provided that the above
copyright notice and this permission notice appear in all copies.

THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.


================================================
FILE: README.md
================================================
<p align="center">
  <br/>
  <a href="https://authjs.dev" target="_blank"><img width="96px" src="https://authjs.dev/img/logo-sm.png" /></a>
  <h3 align="center">Auth.js</h3>
  <p align="center">Authentication for the Web.</p>
  <p align="center">Open Source. Full Stack. Own Your Data.</p>
  <p align="center" style="align: center;">
    <a href="https://x.com/authjs" ><img src="https://shields.io/badge/Follow @authjs-000?logo=x&style=flat-square" alt="X (formerly known Twitter)" /></a>
    <a href="https://github.com/nextauthjs/next-auth/releases"><img src="https://img.shields.io/npm/v/next-auth/latest?style=flat-square&label=latest%20stable" alt="NPM next-auth@latest release" /></a> 
    <!-- TODO: Should count `@auth/core` when NextAuth.js v5 is released as stable. -->
    <a href="https://www.npmtrends.com/next-auth"><img src="https://img.shields.io/npm/dm/next-auth?style=flat-square&color=cyan" alt="Downloads" /></a>
    <a href="https://github.com/nextauthjs/next-auth/stargazers"><img src="https://img.shields.io/github/stars/nextauthjs/next-auth?style=flat-square&color=orange" alt="GitHub Stars" /></a>
    <!-- <a href="https://codecov.io/gh/nextauthjs/next-auth" ><img alt="Codecov" src="https://img.shields.io/codecov/c/github/nextauthjs/next-auth?token=o2KN5GrPsY&style=flat-square&logo=codecov"></a> -->
    <img src="https://shields.io/badge/TypeScript-3178C6?logo=TypeScript&logoColor=fff&style=flat-square" alt="TypeScript" />
  </p>
  <p align="center">
    Auth.js is a set of open-source packages that are built on standard Web APIs for authentication in modern applications with any framework on any platform in any JS runtime.
  </p>
</p>

> Auth js is now part of [Better Auth](https://better-auth.com/blog/authjs-joins-better-auth). We recommend new projects to start with Better Auth unless there are some very specific feature gaps (most notably stateless session management without a database).

## Features

### Flexible and easy to use

- Designed to work with any OAuth service, it supports 2.0+, OIDC
- Built-in support for [many popular sign-in services](https://github.com/nextauthjs/next-auth/tree/main/packages/core/src/providers)
- Email/Passwordless authentication
- Passkeys/WebAuthn support
- Bring Your Database - or none! - stateless authentication with any backend (Active Directory, LDAP, etc.)
- Runtime-agnostic, runs anywhere! (Docker, Node.js, Serverless, etc.)

### Own your data

Auth.js can be used with or without a database.

- An open-source solution that allows you to keep control of your data
- Built-in support for [MySQL, MariaDB, Postgres, Microsoft SQL Server, MongoDB, SQLite, GraphQL, etc.](https://adapters.authjs.dev)
- Works great with databases from popular hosting providers

### Secure by default

- Promotes the use of passwordless sign-in mechanisms
- Designed to be secure by default and encourage best practices for safeguarding user data
- Uses Cross-Site Request Forgery (CSRF) Tokens on POST routes (sign in, sign out)
- Default cookie policy aims for the most restrictive policy appropriate for each cookie
- When JSON Web Tokens are used, they are encrypted by default (JWE) with A256CBC-HS512
- Features tab/window syncing and session polling to support short-lived sessions
- Attempts to implement the latest guidance published by [Open Web Application Security Project](https://owasp.org)

Advanced configuration allows you to define your routines to handle controlling what accounts are allowed to sign in, for encoding and decoding JSON Web Tokens and to set custom cookie security policies and session properties, so you can control who can sign in and how often sessions have to be re-validated.

### TypeScript

Auth.js libraries are written with type safety in mind. [Check out the docs](https://authjs.dev/getting-started/typescript) for more information.

## Security

If you think you have found a vulnerability (or are not sure) in Auth.js or any of the related packages (i.e. Adapters), we ask you to read our [Security Policy](https://authjs.dev/security) to reach out responsibly. Please do not open Pull Requests/Issues/Discussions before consulting with us.

## Acknowledgments

[Auth.js is made possible thanks to all of its contributors.](https://authjs.dev/contributors)

<a href="https://github.com/nextauthjs/next-auth/graphs/contributors">
  <img width="500px" src="https://contrib.rocks/image?repo=nextauthjs/next-auth" />
</a>
<div>
<a href="https://vercel.com?utm_source=nextauthjs&utm_campaign=oss"></a>
</div>

## Contributing

We're open to all community contributions! If you'd like to contribute in any way, please first read
our [Contributing Guide](https://github.com/nextauthjs/.github/blob/main/CONTRIBUTING.md).

## License

ISC


================================================
FILE: apps/dev/express/.gitignore
================================================
# API keys and secrets
.env

# Dependency directory
node_modules

# Editors
.idea
*.iml
.vscode/settings.json

# OS metadata
.DS_Store
Thumbs.db

# Ignore built ts files
dist/**/*

# Ignore built css files
/public/css/output.css



================================================
FILE: apps/dev/express/.prettierignore
================================================

.DS_Store
node_modules
/dist
/.turbo
/package
.env
.env.*
!.env.example

# Ignore files for PNPM, NPM and YARN
pnpm-lock.yaml
package-lock.json
yarn.lock


================================================
FILE: apps/dev/express/README.md
================================================
> The example repository is maintained from a [monorepo](https://github.com/nextauthjs/next-auth/tree/main/apps/examples/express). Pull Requests should be opened against [`nextauthjs/next-auth`](https://github.com/nextauthjs/next-auth).

<p align="center">
   <br/>
   <a href="https://authjs.dev" target="_blank"><img width="150px" src="https://authjs.dev/img/logo-sm.png" /></a>
   <h3 align="center">Auth.js Example App with <a href="https://expressjs.com">Express</a></h3>
   <p align="center">
   Open Source. Full Stack. Own Your Data.
   </p>
   <p align="center" style="align: center;">
      <a href="https://npm.im/@auth/express">
        <img alt="npm" src="https://img.shields.io/npm/v/@auth/express?color=green&label=@auth/express&style=flat-square">
      </a>
      <a href="https://bundlephobia.com/result?p=@auth/express">
        <img src="https://img.shields.io/bundlephobia/minzip/@auth/express?label=size&style=flat-square" alt="Bundle Size"/>
      </a>
      <a href="https://www.npmtrends.com/@auth/express">
        <img src="https://img.shields.io/npm/dm/@auth/express?label=%20downloads&style=flat-square" alt="Downloads" />
      </a>
      <a href="https://npm.im/next-auth">
        <img src="https://img.shields.io/badge/TypeScript-blue?style=flat-square" alt="TypeScript" />
      </a>
   </p>
</p>

# Documentation

- [express.authjs.dev](https://express.authjs.dev)


================================================
FILE: apps/dev/express/api/index.js
================================================
import { app } from "../src/app.js"

export default app


================================================
FILE: apps/dev/express/package.json
================================================
{
  "name": "express-auth-app",
  "description": "Express + Auth.js Developer app",
  "type": "module",
  "private": true,
  "scripts": {
    "start": "node --env-file=.env dist/server.js",
    "clean": "rm -rf dist",
    "build": "pnpm build:ts && pnpm build:css",
    "build:ts": "tsc",
    "build:css": "tailwindcss -i ./public/css/style.css -o ./public/css/output.css",
    "dev": "tsx watch --env-file=.env src/server.ts & pnpm build:css -w",
    "lint": "eslint src/*.ts --fix",
    "prettier": "prettier src/*.ts --write"
  },
  "author": "Auth.js Team (https://authjs.dev/contributors)",
  "license": "MIT",
  "dependencies": {
    "@auth/express": "workspace:*",
    "express": "^4.20.0",
    "morgan": "^1.10.0",
    "pug": "^3.0.2"
  },
  "devDependencies": {
    "@prettier/plugin-pug": "^3.0.0",
    "@types/express": "^4.17.21",
    "@types/morgan": "^1.9.9",
    "@types/pug": "^2.0.10",
    "tsx": "^4.7.3",
    "typescript": "5.4.5"
  }
}


================================================
FILE: apps/dev/express/public/css/style.css
================================================
@tailwind base;

@tailwind components;

@tailwind utilities;


================================================
FILE: apps/dev/express/src/app.ts
================================================
import express, { type Request, type Response } from "express"
import logger from "morgan"
import { join } from "node:path"

import {
  errorHandler,
  errorNotFoundHandler,
} from "./middleware/error.middleware.js"

import {
  authenticatedUser,
  currentSession,
} from "./middleware/auth.middleware.js"
import { ExpressAuth } from "@auth/express"
import { authConfig } from "./config/auth.config.js"
import * as pug from "pug"

export const app = express()

app.set("port", process.env.PORT || 3004)

// @ts-expect-error (https://stackoverflow.com/questions/45342307/error-cannot-find-module-pug)
app.engine("pug", pug.__express)
app.set("views", join(import.meta.dirname, "..", "views"))
app.set("view engine", "pug")

// Trust Proxy for Proxies (Heroku, Render.com, Docker behind Nginx, etc)
// https://stackoverflow.com/questions/40459511/in-express-js-req-protocol-is-not-picking-up-https-for-my-secure-link-it-alwa
app.set("trust proxy", true)

app.use(logger("dev"))

// Serve static files
// NB: Uncomment this out if you want Express to serve static files for you vs. using a
// hosting provider which does so for you (for example through a CDN).
// app.use(express.static(join(import.meta.dirname, "..", "public")))

// Parse incoming requests data
app.use(express.urlencoded({ extended: true }))
app.use(express.json())

// Set session in res.locals
app.use(currentSession)

// Set up ExpressAuth to handle authentication
// IMPORTANT: It is highly encouraged set up rate limiting on this route
app.use("/api/auth/*", ExpressAuth(authConfig))

// Routes
app.get("/protected", async (_req: Request, res: Response) => {
  res.render("protected", { session: res.locals.session })
})

app.get(
  "/api/protected",
  authenticatedUser,
  async (_req: Request, res: Response) => {
    res.json(res.locals.session)
  }
)

app.get("/", async (_req: Request, res: Response) => {
  res.render("index", {
    title: "Express Auth Example",
    user: res.locals.session?.user,
  })
})

// Error handlers
app.use(errorNotFoundHandler)
app.use(errorHandler)


================================================
FILE: apps/dev/express/src/config/auth.config.ts
================================================
import Apple from "@auth/express/providers/apple"
import Auth0 from "@auth/express/providers/auth0"
import AzureB2C from "@auth/express/providers/azure-ad-b2c"
import BoxyHQSAML from "@auth/express/providers/boxyhq-saml"
import Cognito from "@auth/express/providers/cognito"
import Coinbase from "@auth/express/providers/coinbase"
import Discord from "@auth/express/providers/discord"
import Dropbox from "@auth/express/providers/dropbox"
import Facebook from "@auth/express/providers/facebook"
import GitHub from "@auth/express/providers/github"
import Gitlab from "@auth/express/providers/gitlab"
import Google from "@auth/express/providers/google"
import Hubspot from "@auth/express/providers/hubspot"
import Keycloak from "@auth/express/providers/keycloak"
import LinkedIn from "@auth/express/providers/linkedin"
import Netlify from "@auth/express/providers/netlify"
import Okta from "@auth/express/providers/okta"
import Passage from "@auth/express/providers/passage"
import Pinterest from "@auth/express/providers/pinterest"
import Reddit from "@auth/express/providers/reddit"
import Slack from "@auth/express/providers/slack"
import Spotify from "@auth/express/providers/spotify"
import Twitch from "@auth/express/providers/twitch"
import Twitter from "@auth/express/providers/twitter"
import WorkOS from "@auth/express/providers/workos"
import Zoom from "@auth/express/providers/zoom"

export const authConfig = {
  trustHost: true,
  debug: process.env.NODE_ENV !== "production" ? true : false,
  providers: [
    Apple,
    Auth0,
    AzureB2C({
      clientId: process.env.AUTH_AZURE_AD_B2C_ID,
      clientSecret: process.env.AUTH_AZURE_AD_B2C_SECRET,
      issuer: process.env.AUTH_AZURE_AD_B2C_ISSUER,
    }),
    BoxyHQSAML({
      clientId: "dummy",
      clientSecret: "dummy",
      issuer: process.env.AUTH_BOXYHQ_SAML_ISSUER,
    }),
    Cognito,
    Coinbase,
    Discord,
    Dropbox,
    Facebook,
    GitHub,
    Gitlab,
    Google,
    Hubspot,
    Keycloak,
    LinkedIn,
    Netlify,
    Okta,
    Passage,
    Pinterest,
    Reddit,
    Slack,
    Spotify,
    Twitch,
    Twitter,
    WorkOS({
      connection: process.env.AUTH_WORKOS_CONNECTION!,
    }),
    Zoom,
  ],
}


================================================
FILE: apps/dev/express/src/errors.ts
================================================
export class HttpError extends Error {
  status: number
  constructor(status: number, message: string) {
    super(message)
    this.status = status
  }
}

export class NotFoundError extends HttpError {
  constructor(message: string, status = 404) {
    super(status, message)
    this.name = "NotFoundError"
  }
}


================================================
FILE: apps/dev/express/src/middleware/auth.middleware.ts
================================================
import { getSession } from "@auth/express"
import { authConfig } from "../config/auth.config.js"
import type { NextFunction, Request, Response } from "express"

export async function authenticatedUser(
  req: Request,
  res: Response,
  next: NextFunction
) {
  const session = res.locals.session ?? (await getSession(req, authConfig))

  res.locals.session = session

  if (session) {
    return next()
  }

  res.status(400).json({ message: "Not Authenticated" })
}

export async function currentSession(
  req: Request,
  res: Response,
  next: NextFunction
) {
  const session = await getSession(req, authConfig)
  res.locals.session = session
  return next()
}


================================================
FILE: apps/dev/express/src/middleware/error.middleware.ts
================================================
import type { NextFunction, Request, Response } from "express"
import { HttpError, NotFoundError } from "../errors.js"

export const errorHandler = (
  err: HttpError | Error,
  _req: Request,
  res: Response,
  _next: NextFunction
): void => {
  // Render the error page
  res.status(("status" in err && err.status) || 500)
  res.render("error", {
    title: "status" in err ? err.status : err.name,
    message: err.message,
  })
}

export const errorNotFoundHandler = (
  _req: Request,
  _res: Response,
  next: NextFunction
): void => {
  next(new NotFoundError("Not Found"))
}


================================================
FILE: apps/dev/express/src/server.ts
================================================
import { app } from "./app.js"

const port = app.get("port")

const server = app.listen(port, () => {
  console.log(`Listening on port ${port}`)
})

export default server


================================================
FILE: apps/dev/express/tsconfig.json
================================================
{
  "compilerOptions": {
    "module": "NodeNext",
    "esModuleInterop": true,
    "target": "esnext",
    "noImplicitAny": true,
    "moduleResolution": "NodeNext",
    "sourceMap": true,
    "outDir": "dist",
    "baseUrl": ".",
    "skipLibCheck": true,
    "strict": true
  },
  "include": ["src/**/*.ts"],
  "exclude": ["node_modules"]
}


================================================
FILE: apps/dev/express/views/error.pug
================================================
extends layout

block content
  h1=title
  p=message


================================================
FILE: apps/dev/express/views/index.pug
================================================
extends layout

block content
  h1=title
  p
    | This is an example site to demonstrate how to use #{ ' ' }
    a(href="https://expressjs.com/") Express
    | #{ ' ' } with #{ ' ' }
    a(href="https://authjs.dev/reference/express") Express Auth
    |
    | for authentication.


================================================
FILE: apps/dev/express/views/layout.pug
================================================
doctype html
html
  head
    title=title
    meta(name="viewport" content="width=device-width, initial-scale=1.0")
  body
    div
      div
        if session
          div
            if session.user.image
              img(src=`${session.user.image}` style="width:64px;border-radius:50%;")
            span
              | Signed in as #{ ' ' }
              strong= session.user.email || session.user.name
          a(
            href="/api/auth/signout"
          ) Sign out
        else
          span You are not signed in #{ ' ' }
          a#sign-indiv(
            href="/api/auth/signin"
          ) Sign in

      nav
        ul
          li
            a(href="/") Home
          li
            a(href="/protected") Protected
          li
            a(href="/api/protected") Protected (API)

      block content


================================================
FILE: apps/dev/express/views/protected.pug
================================================
extends layout

block content
  if session
    h1 Protected page
    p
      | This is a protected content. You can access this content because you are
      | signed in.
    p Session expiry: #{ session.expires ? session.expires : '' }
  else
    h1 Access Denied
    p
      | You must be #{ ' ' }
      a(href="/api/auth/signin") signed in
      | #{ ' ' } to view this page


================================================
FILE: apps/dev/nextjs/.gitignore
================================================
node_modules/
/test-results/
/playwright-report/
/playwright/.cache/
dbschema/edgeql-js


================================================
FILE: apps/dev/nextjs/.vscode/settings.json
================================================
{
  "typescript.tsdk": "../../../node_modules/.pnpm/typescript@4.9.4/node_modules/typescript/lib",
  "typescript.enablePromptUseWorkspaceTsdk": true
}


================================================
FILE: apps/dev/nextjs/README.md
================================================
# NextAuth.js Development App

This folder contains a Next.js app using NextAuth.js for local development. See the following section on how to start:

[Setting up local environment
](https://github.com/nextauthjs/.github/blob/main/CONTRIBUTING.md#setting-up-local-environment)


================================================
FILE: apps/dev/nextjs/app/api/protected/route.ts
================================================
import { auth } from "auth"
import { NextResponse } from "next/server"

export const GET = auth(function GET(req) {
  if (req.auth) return NextResponse.json(req.auth)
  return NextResponse.json({ message: "Not authenticated" }, { status: 401 })
})


================================================
FILE: apps/dev/nextjs/app/auth/[...nextauth]/route.ts
================================================
import { handlers } from "auth"
export const { GET, POST } = handlers

// export const runtime = "edge"


================================================
FILE: apps/dev/nextjs/app/client.tsx
================================================
"use client"

import { signIn, signOut, useSession } from "next-auth/react"
import { useRouter } from "next/navigation"

export default function Client() {
  const { data: session, update, status } = useSession()
  const router = useRouter()
  return (
    <div className="card">
      <div className="card-header">
        <h3>Client Component</h3>
      </div>
      <div className="card-body">
        <h4>Session</h4>
        <pre>
          {status === "loading"
            ? "Loading..."
            : JSON.stringify(session, null, 2)}
        </pre>
        <div className="btn-wrapper">
          {session ? (
            <>
              <button
                onClick={async () => {
                  await update({ user: { name: "Client Fill Murray" } })
                  router.refresh()
                }}
              >
                Update Session - New Name
              </button>
              <button onClick={() => signOut()}>Sign out</button>
            </>
          ) : (
            <>
              <button onClick={() => signIn("github")}>Sign in GitHub</button>
              <button
                onClick={async () => {
                  await signIn("webauthn", {})
                }}
              >
                Sign in Credentials
              </button>
            </>
          )}
        </div>
      </div>
    </div>
  )
}


================================================
FILE: apps/dev/nextjs/app/dashboard/page.tsx
================================================
export default function Page() {
  return <h1>This page is protected.</h1>
}


================================================
FILE: apps/dev/nextjs/app/layout.tsx
================================================
import { auth, signIn, signOut, unstable_update as update } from "auth"
import Footer from "components/footer"
import { Header } from "components/header"
import styles from "components/header.module.css"
import "./styles.css"
import { AuthError } from "next-auth"

export default function RootLayout(props: { children: React.ReactNode }) {
  return (
    <html>
      <body>
        <AppHeader />
        <main>{props.children}</main>
        <Footer />
      </body>
    </html>
  )
}

export async function AppHeader() {
  const session = await auth()
  return (
    <Header
      session={session}
      signIn={
        <form
          action={async () => {
            "use server"
            try {
              await signIn()
            } catch (error) {
              if (error instanceof AuthError) {
                console.log(error)
              }
              throw error
            }
          }}
        >
          <button className={styles.buttonPrimary}>Sign in</button>
        </form>
      }
      signOut={
        <form
          action={async () => {
            "use server"
            await signOut()
          }}
        >
          <button className={styles.buttonPrimary}>Sign out</button>
        </form>
      }
    />
  )
}


================================================
FILE: apps/dev/nextjs/app/page.tsx
================================================
import { auth, unstable_update as update } from "auth"
import { SessionProvider } from "next-auth/react"
import Client from "./client"
import { revalidatePath } from "next/cache"
import { redirect } from "next/navigation"

export default async function Page() {
  const session = await auth()
  return (
    <div className="container">
      <h1>NextAuth.js Example</h1>
      <p>
        This is an example site to demonstrate how to use{" "}
        <a href="https://nextjs.authjs.dev">NextAuth.js</a> for authentication.
      </p>
      <div className="card">
        <div className="card-header">
          <h3>Server Action</h3>
        </div>
        <div className="card-body">
          {session ? (
            <form
              action={async () => {
                "use server"
                await update({ user: { name: "Server Fill Murray" } })
                // revalidatePath("/")
                redirect("/")
              }}
            >
              <button>Update Session - New Name</button>
            </form>
          ) : null}
        </div>
        <div className="card-footer">
          Note: The "Sign in" button in the header is using{" "}
          <b>server form actions</b>.
        </div>
      </div>
      {/* 
       NOTE: The `auth()` result is not run through the `session` callback, be careful passing down data
       to a client component, this will be exposed via the /api/auth/session endpoint
      */}
      <SessionProvider session={session} basePath="/auth">
        <Client />
      </SessionProvider>
    </div>
  )
}


================================================
FILE: apps/dev/nextjs/app/styles.css
================================================
body {
  font-family:
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    Roboto,
    "Helvetica Neue",
    Arial,
    "Noto Sans",
    sans-serif,
    "Apple Color Emoji",
    "Segoe UI Emoji",
    "Segoe UI Symbol",
    "Noto Color Emoji";
  max-width: 960px;
  margin: 0 auto;
  background: #fff;
  color: var(--color-text);
  height: 100dvh;
  display: flex;
  flex-direction: column;
}

li,
p {
  line-height: 1.5rem;
  margin: 0;
}

a {
  font-weight: 500;
}

hr {
  border: 1px solid #ddd;
}

iframe {
  background: #ccc;
  border: 1px solid #ccc;
  height: 10rem;
  width: 100%;
  border-radius: 0.5rem;
  filter: invert(1);
}

h1,
h2,
h3,
h4,
h5,
h6 {
  margin: 0;
}

main {
  flex-grow: 1;

  @media screen and (max-width: 960px) {
    padding: 0 1rem;
  }
}

.container {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: stretch;
  justify-content: flex-start;
}

.card {
  border-radius: 0.75rem;
  background-color: #f3f3f3;

  .card-header {
    border-radius: 0.75rem 0.75rem 0 0;
    background-color: #dfdfdf;
    padding: 1.1rem;
  }

  .card-body {
    padding-bottom: 1.1rem;

    &:has(button) {
      padding: 1.1rem;
    }
  }

  .card-footer {
    padding: 1.1rem;
    padding-top: 0;
    color: #777;
    font-style: italic;
  }

  pre {
    background-color: #ccc;
    padding: 1rem;
    border-radius: 0.5rem;
    word-break: break-all;
    white-space: pre-wrap;
  }

  .btn-wrapper {
    display: flex;
    gap: 1rem;
  }

  button {
    justify-self: end;
    font-weight: 500;
    border-radius: 0.5rem;
    border: none;
    font-weight: bold;
    cursor: pointer;
    font-size: 1rem;
    line-height: 1.4rem;
    padding: 0.7rem 0.8rem;
    position: relative;
    z-index: 10;
    background-color: #d5d5d5;
    color: black;
    text-decoration: none;
    padding: 0.7rem 1.4rem;
  }
  button:hover {
    background-color: #ccc;
  }
}


================================================
FILE: apps/dev/nextjs/auth.ts
================================================
import NextAuth from "next-auth"
import Credentials from "next-auth/providers/credentials"
import Keycloak from "next-auth/providers/keycloak"
import GitHub from "next-auth/providers/github"

// import { PrismaClient } from "@prisma/client"
// import { PrismaAdapter } from "@auth/prisma-adapter"
// import SendGrid from "next-auth/providers/sendgrid"
// import Resend from "next-auth/providers/resend"
// import Email from "next-auth/providers/email"

// globalThis.prisma ??= new PrismaClient()

// authConfig.providers.push(
//   // Start server with `pnpm email`
//   Email({ server: "smtp://127.0.0.1:1025?tls.rejectUnauthorized=false" }),
//   SendGrid,
//   Resend
// )

// export const { handlers, auth, signIn, signOut, unstable_update } = NextAuth(
//   (request) => {
//     if (request?.nextUrl.searchParams.get("test")) {
//       return {
//         // adapter: PrismaAdapter(globalThis.prisma),
//         session: { strategy: "jwt" },
//         ...authConfig,
//         providers: [],
//       }
//     }
//     return {
//       // adapter: PrismaAdapter(globalThis.prisma),
//       session: { strategy: "jwt" },
//       ...authConfig,
//     }
//   }
// )

declare module "next-auth" {
  /**
   * Returned by `useSession`, `getSession`, `auth` and received as a prop on the `SessionProvider` React Context
   */
  interface Session {
    user: {
      /** The user's postal address. */
      address: string
    } & User
  }

  interface User {
    foo?: string
  }
}

export const { handlers, auth, signIn, signOut, unstable_update } = NextAuth({
  debug: true,
  providers: [
    Credentials({
      credentials: { password: { label: "Password", type: "password" } },
      authorize(c) {
        if (c.password !== "password") return null
        return {
          id: "test",
          name: "Test User",
          email: "test@example.com",
        }
      },
    }),
    GitHub,
    Keycloak,
  ],

  callbacks: {
    jwt({ token, trigger, session }) {
      if (trigger === "update") token.name = session.user.name
      return token
    },
  },
  basePath: "/auth",
  session: { strategy: "jwt" },
})


================================================
FILE: apps/dev/nextjs/components/access-denied.tsx
================================================
import { signIn } from "next-auth/react"

export default function AccessDenied() {
  return (
    <>
      <h1>Access Denied</h1>
      <p>
        <a
          href="/api/auth/signin"
          onClick={(e) => {
            e.preventDefault()
            signIn()
          }}
        >
          You must be signed in to view this page
        </a>
      </p>
    </>
  )
}


================================================
FILE: apps/dev/nextjs/components/footer.module.css
================================================
.footer {
  margin: 0;
  padding: 0 1rem 0 1rem;

  @media screen and (min-width: 960px) {
    padding: 0;
  }
}

.navItems {
  padding: 2rem 0rem 2rem 0rem;
  margin: 0;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.navItemsLeft {
  display: flex;
  align-items: center;

  @media screen and (max-width: 460px) {
    flex-direction: column;
    align-items: flex-start;
  }
}

.navItem {
  display: inline-block;
  margin-right: 1rem;
  display: flex;
  align-items: center;
}

.navItem a {
  color: rgb(2, 8, 23);
  text-underline-offset: 4px;
  font-size: 14px;
}

.navItem svg {
  margin-left: 4px;
  height: 16px;
  width: 16px;
}

.footerLogo {
  height: 20px;
  width: 20px;
  margin-right: 0.5rem;
}


================================================
FILE: apps/dev/nextjs/components/footer.tsx
================================================
import Link from "next/link"
import styles from "./footer.module.css"
import packageJSON from "next-auth/package.json"

export default function Footer() {
  return (
    <footer className={styles.footer}>
      <ul className={styles.navItems}>
        <div className={styles.navItemsLeft}>
          <li className={styles.navItem}>
            <a href="https://authjs.dev">Documentation</a>
            <svg
              xmlns="http://www.w3.org/2000/svg"
              width="16"
              height="16"
              viewBox="0 0 24 24"
              fill="none"
              stroke="currentColor"
              strokeWidth="2"
              strokeLinecap="round"
              strokeLinejoin="round"
            >
              <path d="M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"></path>
              <polyline points="15 3 21 3 21 9"></polyline>
              <line x1="10" x2="21" y1="14" y2="3"></line>
            </svg>
          </li>
          <li className={styles.navItem}>
            <a href="https://www.npmjs.com/package/next-auth">NPM</a>
            <svg
              xmlns="http://www.w3.org/2000/svg"
              width="16"
              height="16"
              viewBox="0 0 24 24"
              fill="none"
              stroke="currentColor"
              strokeWidth="2"
              strokeLinecap="round"
              strokeLinejoin="round"
            >
              <path d="M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"></path>
              <polyline points="15 3 21 3 21 9"></polyline>
              <line x1="10" x2="21" y1="14" y2="3"></line>
            </svg>
          </li>
          <li className={styles.navItem}>
            <a href="https://github.com/nextauthjs/next-auth-example">GitHub</a>
            <svg
              xmlns="http://www.w3.org/2000/svg"
              width="16"
              height="16"
              viewBox="0 0 24 24"
              fill="none"
              stroke="currentColor"
              strokeWidth="2"
              strokeLinecap="round"
              strokeLinejoin="round"
            >
              <path d="M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"></path>
              <polyline points="15 3 21 3 21 9"></polyline>
              <line x1="10" x2="21" y1="14" y2="3"></line>
            </svg>
          </li>
          <li className={styles.navItem}>
            <Link href="/policy">Policy</Link>
          </li>
        </div>
        <li className={styles.navItem} style={{ margin: "0" }}>
          <img
            className={styles.footerLogo}
            src="https://authjs.dev/img/logo-sm.png"
            alt="Auth.js Logo"
          />
          <Link href="https://npmjs.org/package/next-auth">
            {packageJSON.version}
          </Link>
          <svg
            xmlns="http://www.w3.org/2000/svg"
            width="16"
            height="16"
            viewBox="0 0 24 24"
            fill="none"
            stroke="currentColor"
            strokeWidth="2"
            strokeLinecap="round"
            strokeLinejoin="round"
          >
            <path d="M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"></path>
            <polyline points="15 3 21 3 21 9"></polyline>
            <line x1="10" x2="21" y1="14" y2="3"></line>
          </svg>
        </li>
      </ul>
    </footer>
  )
}


================================================
FILE: apps/dev/nextjs/components/header.module.css
================================================
/* Set min-height to avoid page reflow while session loading */
.signedInStatus {
  display: flex;
  align-items: center;
  min-height: 4rem;
  padding: 1rem;
  background-color: #f3f3f3;
}

.loading,
.loaded {
  position: relative;
  top: 0;
  opacity: 1;
  overflow: hidden;
  border-radius: 0 0 0.6rem 0.6rem;
  padding: 0.6rem 1rem;
  margin: 0;
  background-color: rgba(0, 0, 0, 0.05);
  transition: all 0.2s ease-in;
}

.loading {
  top: -2rem;
  opacity: 0;
}

.signedInText,
.notSignedInText {
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
  z-index: 1;
  line-height: 1.3rem;
  flex: 1;
}

.signedInText {
  padding-top: 0rem;
  left: 4.6rem;
}

.avatar {
  border-radius: 2rem;
  float: left;
  height: 2.8rem;
  width: 2.8rem;
  margin-right: 1rem;
  background-color: white;
  background-size: cover;
  background-repeat: no-repeat;
}

.button,
.buttonPrimary {
  justify-self: end;
  font-weight: 500;
  border-radius: 0.3rem;
  border: none;
  font-weight: bold;
  cursor: pointer;
  font-size: 1rem;
  line-height: 1.4rem;
  padding: 0.7rem 0.8rem;
  position: relative;
  z-index: 10;
  background-color: transparent;
  color: #555;
}

.buttonPrimary {
  background-color: #346df1;
  border-color: #346df1;
  color: #fff;
  text-decoration: none;
  padding: 0.7rem 1.4rem;
}

.buttonPrimary:hover {
  box-shadow: inset 0 0 5rem rgba(0, 0, 0, 0.2);
}

.navItems {
  padding: 0;
  margin: 0;
  list-style: none;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
}

.navItem {
  flex-grow: 1;
  display: inline-block;
  text-align: center;
  background-color: #d5d5d5;
  border-radius: 0 0 0.5rem 0.5rem;
  padding: 1rem 0 1rem 0;
  text-decoration: none;
  color: black;
}

.navItem:hover {
  background-color: #ccc;
}

.header {
  border-radius: 0 0 0.6rem 0.6rem;
  margin-bottom: 2rem;

  @media screen and (max-width: 960px) {
    padding: 0 1rem;
  }
}

.passwordInput {
  padding: 0.75rem;
  border-radius: 0.3rem;
  border: #ccc solid 2px;
  margin-right: 1rem;
}


================================================
FILE: apps/dev/nextjs/components/header.tsx
================================================
import type { Session } from "next-auth"
import Link from "next/link"
import styles from "./header.module.css"

export function Header({
  session,
  signIn,
  signOut,
}: {
  session: Session | null
  signIn: any
  signOut: any
}) {
  return (
    <header className={styles.header}>
      <div className={styles.signedInStatus}>
        <img
          src={
            session?.user?.image ??
            `https://api.dicebear.com/9.x/thumbs/svg?seed=${Math.floor(Math.random() * 100000) + 1}&randomizeIds=true`
          }
          className={styles.avatar}
        />
        {session?.user ? (
          <>
            <span className={styles.signedInText}>
              <small>Signed in as</small>
              <br />
              <strong>{session.user?.email} </strong>
              {session.user?.name ? `(${session.user.name})` : null}
            </span>
            {signOut}
          </>
        ) : (
          <>
            <span className={styles.notSignedInText}>
              You are not signed in
            </span>
            {signIn}
          </>
        )}
      </div>
      <nav>
        <ul className={styles.navItems}>
          <Link href="/" className={styles.navItem}>
            Home (app)
          </Link>
          <Link className={styles.navItem} href="/dashboard">
            Dashboard (app)
          </Link>
          <Link className={styles.navItem} href="/policy">
            Policy (pages)
          </Link>
          <Link className={styles.navItem} href="/credentials">
            Credentials (pages)
          </Link>
          <Link className={styles.navItem} href="/protected-ssr">
            getServerSideProps (pages)
          </Link>
          <Link className={styles.navItem} href="/api/examples/protected">
            API Route (pages)
          </Link>
        </ul>
      </nav>
    </header>
  )
}


================================================
FILE: apps/dev/nextjs/middleware.ts
================================================
export { auth as middleware } from "auth"

// Or like this if you need to do something here.
// export default auth((req) => {
//   console.log(req.auth) //  { session: { user: { ... } } }
// })

// Read more: https://nextjs.org/docs/app/building-your-application/routing/middleware#matcher
export const config = {
  matcher: ["/((?!api|_next/static|_next/image|favicon.ico).*)"],
}


================================================
FILE: apps/dev/nextjs/next-env.d.ts
================================================
/// <reference types="next" />
/// <reference types="next/image-types/global" />
/// <reference types="next/navigation-types/compat/navigation" />

// NOTE: This file should not be edited
// see https://nextjs.org/docs/app/api-reference/config/typescript for more information.


================================================
FILE: apps/dev/nextjs/next.config.js
================================================
/** @type {import("next").NextConfig} */
module.exports = {
  webpack(config) {
    config.experiments = { ...config.experiments, topLevelAwait: true }
    return config
  },
  typescript: { ignoreBuildErrors: true },
}


================================================
FILE: apps/dev/nextjs/package.json
================================================
{
  "name": "next-auth-app",
  "version": "1.0.1",
  "description": "Next.js + Auth.js Developer App",
  "private": true,
  "scripts": {
    "clean": "rm -rf .next",
    "dev": "next dev",
    "build": "next build",
    "start": "next start"
  },
  "license": "ISC",
  "dependencies": {
    "next": "15.3.1",
    "next-auth": "workspace:*",
    "react": "19.0.0-rc-4c58fce7-20240904",
    "react-dom": "19.0.0-rc-4c58fce7-20240904"
  },
  "devDependencies": {
    "@types/react": "^18.2.23",
    "@types/react-dom": "^18.2.8"
  }
}


================================================
FILE: apps/dev/nextjs/pages/_app.tsx
================================================
import { SessionProvider, signIn, signOut, useSession } from "next-auth/react"
import "./styles.css"
import { Header } from "components/header"
import styles from "components/header.module.css"
import Footer from "components/footer"

export default function App({ Component, pageProps }) {
  return (
    <SessionProvider session={pageProps.session} basePath="/auth">
      <PagesHeader />
      <Component {...pageProps} />
      <Footer />
    </SessionProvider>
  )
}

function PagesHeader() {
  const { data: session } = useSession()
  return (
    <Header
      session={session}
      signIn={
        <button onClick={() => signIn()} className={styles.buttonPrimary}>
          Sign in
        </button>
      }
      signOut={
        <button onClick={() => signOut()} className={styles.button}>
          Sign out
        </button>
      }
    />
  )
}


================================================
FILE: apps/dev/nextjs/pages/api/examples/protected.ts
================================================
import type { NextApiHandler } from "next"

import { auth } from "../../../auth"

export default async function handler(...args: Parameters<NextApiHandler>) {
  const session = await auth(...args)
  const res = args[1]
  if (session?.user) {
    // Do something with the session
    return res.json("This is protected content.")
  }
  res.status(401).json("You must be signed in.")
}


================================================
FILE: apps/dev/nextjs/pages/api/examples/session.ts
================================================
// This is an example of how to access a session from an API route
import { auth } from "auth"

export default async (req, res) => {
  const session = await auth(req, res)
  res.json(session)
}


================================================
FILE: apps/dev/nextjs/pages/client.tsx
================================================
export default function Page() {
  return (
    <>
      <h1>Client Side Rendering</h1>
      <p>
        This page uses the <strong>useSession()</strong> React Hook in the{" "}
        <strong>&lt;/Header&gt;</strong> component.
      </p>
      <p>
        The <strong>useSession()</strong> React Hook easy to use and allows
        pages to render very quickly.
      </p>
      <p>
        The advantage of this approach is that session state is shared between
        pages by using the <strong>Provider</strong> in <strong>_app.js</strong>{" "}
        so that navigation between pages using <strong>useSession()</strong> is
        very fast.
      </p>
      <p>
        The disadvantage of <strong>useSession()</strong> is that it requires
        client side JavaScript.
      </p>
    </>
  )
}


================================================
FILE: apps/dev/nextjs/pages/credentials.tsx
================================================
import * as React from "react"
import { signIn, signOut, useSession } from "next-auth/react"
import { SignInResponse, SignOutResponse } from "next-auth/react"

export default function Page() {
  const [response, setResponse] = React.useState<
    SignInResponse | SignOutResponse
  >()

  const { data: session } = useSession()

  if (session) {
    return (
      <>
        <h1>Test different flows for Credentials logout</h1>
        <span className="spacing">Default: </span>
        <button onClick={() => signOut()}>Logout</button>
        <br />
        <span className="spacing">No redirect: </span>
        <button onClick={() => signOut({ redirect: false }).then(setResponse)}>
          Logout
        </button>
        <br />
        <p>{response ? "Response:" : "Session:"}</p>
        <pre style={{ background: "#eee", padding: 16 }}>
          {JSON.stringify(response ?? session, null, 2)}
        </pre>
      </>
    )
  }

  return (
    <>
      <h1>Test different flows for Credentials login</h1>
      <span className="spacing">Default: </span>
      <button onClick={() => signIn("credentials", { password: "password" })}>
        Login
      </button>
      <br />
      <span className="spacing">No redirect: </span>
      <button
        onClick={() =>
          signIn("credentials", { redirect: false, password: "password" }).then(
            setResponse
          )
        }
      >
        Login
      </button>
      <br />
      <span className="spacing">No redirect, wrong password: </span>
      <button
        onClick={() =>
          signIn("credentials", { redirect: false, password: "wrong" }).then(
            setResponse
          )
        }
      >
        Login
      </button>
      <p>Response:</p>
      <pre style={{ background: "#eee", padding: 16 }}>
        {JSON.stringify(response, null, 2)}
      </pre>
    </>
  )
}


================================================
FILE: apps/dev/nextjs/pages/email.tsx
================================================
// eslint-disable-next-line no-use-before-define
import * as React from "react"
import { signIn, signOut, useSession } from "next-auth/react"

export default function Page() {
  const [response, setResponse] =
    React.useState<Awaited<ReturnType<typeof signIn>>>()
  const [email, setEmail] = React.useState("")

  const handleChange = (event) => {
    setEmail(event.target.value)
  }

  const handleLogin = (options) => async (event) => {
    event.preventDefault()

    if (options.redirect) {
      return signIn("email", options)
    }
    const response = await signIn("email", options)
    setResponse(response)
  }

  const handleLogout = (options) => async (event) => {
    if (options.redirect) {
      return signOut(options)
    }
    const response = await signOut(options)
    setResponse(response)
  }

  const { data: session } = useSession()

  if (session) {
    return (
      <>
        <h1>Test different flows for Email logout</h1>
        <span className="spacing">Default:</span>
        <button onClick={handleLogout({ redirect: true })}>Logout</button>
        <br />
        <span className="spacing">No redirect:</span>
        <button onClick={handleLogout({ redirect: false })}>Logout</button>
        <br />
        <p>Response:</p>
        <pre style={{ background: "#eee", padding: 16 }}>
          {JSON.stringify(response, null, 2)}
        </pre>
      </>
    )
  }

  return (
    <>
      <h1>Test different flows for Email login</h1>
      <label className="spacing">
        Email address:{" "}
        <input
          type="text"
          id="email"
          name="email"
          value={email}
          onChange={handleChange}
        />
      </label>
      <br />
      <form onSubmit={handleLogin({ redirect: true, email })}>
        <span className="spacing">Default:</span>
        <button type="submit">Sign in with Email</button>
      </form>
      <form onSubmit={handleLogin({ redirect: false, email })}>
        <span className="spacing">No redirect:</span>
        <button type="submit">Sign in with Email</button>
      </form>
      <p>Response:</p>
      <pre style={{ background: "#eee", padding: 16 }}>
        {JSON.stringify(response, null, 2)}
      </pre>
    </>
  )
}


================================================
FILE: apps/dev/nextjs/pages/policy.tsx
================================================
export default function Page() {
  return (
    <>
      <p>
        This is an example site to demonstrate how to use{" "}
        <a href="https://authjs.dev">Auth.js</a> for authentication.
      </p>
      <h2>Terms of Service</h2>
      <p>
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
        OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
        MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
        IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
        CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
        TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
        SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
      </p>
      <h2>Privacy Policy</h2>
      <p>
        Data provided to this site is exclusively used to support signing in and
        is not passed to any third party services, other than via SMTP or OAuth
        for the purposes of authentication.
      </p>
    </>
  )
}


================================================
FILE: apps/dev/nextjs/pages/protected-ssr.tsx
================================================
// This is an example of how to protect content using server rendering
import { auth } from "../auth"
import AccessDenied from "components/access-denied"
import { GetServerSideProps } from "next"

export default function Page({ content, session }) {
  // If no session exists, display access denied message
  if (!session) return <AccessDenied />

  // If session exists, display content
  return (
    <>
      <h1>Protected Page</h1>
      <p>
        <strong>{content}</strong>
      </p>
    </>
  )
}

export const getServerSideProps: GetServerSideProps = async (context) => {
  const session = await auth(context)
  if (session) {
    // Note usually you don't need to fetch from an API route in getServerSideProps
    // This is done here to demonstrate how you can fetch from a third-party API
    // with a valid session. Likely you would also not pass cookies but an `Authorization` header
    const hostname =
      process.env.NEXTAUTH_URL ??
      (process.env.VERCEL
        ? "https://next-auth-example-v5.vercel.app"
        : "http://localhost:3000")
    const res = await fetch(`${hostname}/api/examples/protected`, {
      headers: { cookie: context.req.headers.cookie ?? "" },
    })
    return { props: { session, content: await res.json() } }
  }

  return { props: {} }
}


================================================
FILE: apps/dev/nextjs/pages/protected.tsx
================================================
import { useState, useEffect } from "react"
import { useSession } from "next-auth/react"

export default function Page() {
  const { status } = useSession({ required: true })
  const [content, setContent] = useState()

  // Fetch content from protected route
  useEffect(() => {
    if (status === "loading") return
    const fetchData = async () => {
      const res = await fetch("/api/examples/protected")
      const json = await res.json()
      if (json.content) {
        setContent(json.content)
      }
    }
    fetchData()
  }, [status])

  if (status === "loading") return "Loading..."

  // If session exists, display content
  return (
    <>
      <h1>Protected Page</h1>
      <p>
        <strong>{content}</strong>
      </p>
    </>
  )
}


================================================
FILE: apps/dev/nextjs/pages/styles.css
================================================
body {
  font-family:
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    Roboto,
    "Helvetica Neue",
    Arial,
    "Noto Sans",
    sans-serif,
    "Apple Color Emoji",
    "Segoe UI Emoji",
    "Segoe UI Symbol",
    "Noto Color Emoji";
  padding: 0 1rem 1rem 1rem;
  max-width: 680px;
  margin: 0 auto;
  background: #fff;
  color: var(--color-text);
}

li,
p {
  line-height: 1.5rem;
}

a {
  font-weight: 500;
}

hr {
  border: 1px solid #ddd;
}

iframe {
  background: #ccc;
  border: 1px solid #ccc;
  height: 10rem;
  width: 100%;
  border-radius: 0.5rem;
  filter: invert(1);
}


================================================
FILE: apps/dev/nextjs/prisma/migrations/20231023165117_/migration.sql
================================================
-- CreateTable
CREATE TABLE "Account" (
    "id" TEXT NOT NULL PRIMARY KEY,
    "userId" TEXT NOT NULL,
    "type" TEXT NOT NULL,
    "provider" TEXT NOT NULL,
    "providerAccountId" TEXT NOT NULL,
    "refresh_token" TEXT,
    "access_token" TEXT,
    "expires_at" INTEGER,
    "token_type" TEXT,
    "scope" TEXT,
    "id_token" TEXT,
    "session_state" TEXT,
    CONSTRAINT "Account_userId_fkey" FOREIGN KEY ("userId") REFERENCES "User" ("id") ON DELETE RESTRICT ON UPDATE CASCADE
);

-- CreateTable
CREATE TABLE "Session" (
    "id" TEXT NOT NULL PRIMARY KEY,
    "sessionToken" TEXT NOT NULL,
    "userId" TEXT NOT NULL,
    "expires" DATETIME NOT NULL,
    CONSTRAINT "Session_userId_fkey" FOREIGN KEY ("userId") REFERENCES "User" ("id") ON DELETE RESTRICT ON UPDATE CASCADE
);

-- CreateTable
CREATE TABLE "User" (
    "id" TEXT NOT NULL PRIMARY KEY,
    "name" TEXT,
    "email" TEXT,
    "emailVerified" DATETIME,
    "image" TEXT
);

-- CreateTable
CREATE TABLE "VerificationToken" (
    "identifier" TEXT NOT NULL,
    "token" TEXT NOT NULL,
    "expires" DATETIME NOT NULL
);

-- CreateIndex
CREATE UNIQUE INDEX "Account_provider_providerAccountId_key" ON "Account"("provider", "providerAccountId");

-- CreateIndex
CREATE UNIQUE INDEX "Session_sessionToken_key" ON "Session"("sessionToken");

-- CreateIndex
CREATE UNIQUE INDEX "User_email_key" ON "User"("email");

-- CreateIndex
CREATE UNIQUE INDEX "VerificationToken_token_key" ON "VerificationToken"("token");

-- CreateIndex
CREATE UNIQUE INDEX "VerificationToken_identifier_token_key" ON "VerificationToken"("identifier", "token");


================================================
FILE: apps/dev/nextjs/prisma/migrations/20240124035029_init/migration.sql
================================================
-- CreateTable
CREATE TABLE "Account" (
    "userId" TEXT NOT NULL,
    "type" TEXT NOT NULL,
    "provider" TEXT NOT NULL,
    "providerAccountId" TEXT NOT NULL,
    "refresh_token" TEXT,
    "access_token" TEXT,
    "expires_at" INTEGER,
    "token_type" TEXT,
    "scope" TEXT,
    "id_token" TEXT,
    "session_state" TEXT,

    PRIMARY KEY ("provider", "providerAccountId"),
    CONSTRAINT "Account_userId_fkey" FOREIGN KEY ("userId") REFERENCES "User" ("id") ON DELETE CASCADE ON UPDATE CASCADE
);

-- CreateTable
CREATE TABLE "Session" (
    "id" TEXT NOT NULL PRIMARY KEY,
    "sessionToken" TEXT NOT NULL,
    "userId" TEXT NOT NULL,
    "expires" DATETIME NOT NULL,
    CONSTRAINT "Session_userId_fkey" FOREIGN KEY ("userId") REFERENCES "User" ("id") ON DELETE RESTRICT ON UPDATE CASCADE
);

-- CreateTable
CREATE TABLE "User" (
    "id" TEXT NOT NULL PRIMARY KEY,
    "name" TEXT,
    "email" TEXT,
    "emailVerified" DATETIME,
    "image" TEXT
);

-- CreateTable
CREATE TABLE "VerificationToken" (
    "identifier" TEXT NOT NULL,
    "token" TEXT NOT NULL,
    "expires" DATETIME NOT NULL
);

-- CreateTable
CREATE TABLE "Authenticator" (
    "id" TEXT NOT NULL PRIMARY KEY,
    "credentialID" TEXT NOT NULL,
    "userId" TEXT NOT NULL,
    "providerAccountId" TEXT NOT NULL,
    "credentialPublicKey" TEXT NOT NULL,
    "counter" INTEGER NOT NULL,
    "credentialDeviceType" TEXT NOT NULL,
    "credentialBackedUp" BOOLEAN NOT NULL,
    "transports" TEXT,
    CONSTRAINT "Authenticator_userId_fkey" FOREIGN KEY ("userId") REFERENCES "User" ("id") ON DELETE CASCADE ON UPDATE CASCADE
);

-- CreateIndex
CREATE UNIQUE INDEX "Session_sessionToken_key" ON "Session"("sessionToken");

-- CreateIndex
CREATE UNIQUE INDEX "User_email_key" ON "User"("email");

-- CreateIndex
CREATE UNIQUE INDEX "VerificationToken_token_key" ON "VerificationToken"("token");

-- CreateIndex
CREATE UNIQUE INDEX "VerificationToken_identifier_token_key" ON "VerificationToken"("identifier", "token");

-- CreateIndex
CREATE UNIQUE INDEX "Authenticator_credentialID_key" ON "Authenticator"("credentialID");


================================================
FILE: apps/dev/nextjs/prisma/migrations/migration_lock.toml
================================================
# Please do not edit this file manually
# It should be added in your version-control system (i.e. Git)
provider = "sqlite"

================================================
FILE: apps/dev/nextjs/prisma/schema.prisma
================================================
datasource db {
  provider = "sqlite"
  url      = "file:./dev.db"
}

generator client {
  provider = "prisma-client-js"
}

model Account {
  userId            String
  type              String
  provider          String
  providerAccountId String
  refresh_token     String?
  access_token      String?
  expires_at        Int?
  token_type        String?
  scope             String?
  id_token          String?
  session_state     String?

  user User @relation(fields: [userId], references: [id], onDelete: Cascade)

  @@id([provider, providerAccountId])
}

model Session {
  id           String   @id @default(cuid())
  sessionToken String   @unique
  userId       String
  expires      DateTime
  user         User     @relation(fields: [userId], references: [id])
}

model User {
  id            String    @id @default(cuid())
  name          String?
  email         String?   @unique
  emailVerified DateTime?
  image         String?
  accounts      Account[]
  sessions      Session[]
  Authenticator Authenticator[]
}

model VerificationToken {
  identifier String
  token      String   @unique
  expires    DateTime

  @@unique([identifier, token])
}

model Authenticator {
  id                   String  @id @default(cuid())
  credentialID         String  @unique
  userId               String
  providerAccountId    String
  credentialPublicKey  String
  counter              Int
  credentialDeviceType String
  credentialBackedUp   Boolean
  transports           String?

  user User @relation(fields: [userId], references: [id], onDelete: Cascade)
}


================================================
FILE: apps/dev/nextjs/tests/signin.spec.ts
================================================
import { test, expect } from "@playwright/test"

test("Sign in with Auth0", async ({ page }) => {
  // Go to NextAuth example app
  await page.goto("https://next-auth-example.vercel.app")

  // Click 'Sign In'
  await page.click("#__next > header > div > p > a")

  // Auth0 Login Provider
  await page.click('body > div > div form[action*="auth0"] > button')

  // Enter Credentials (Username/Password Login) on Auth0 Widget
  await page.type("#username", process.env.AUTH0_USERNAME!)
  await page.type("#password", process.env.AUTH0_PASSWORD!)

  // Snap a screenshot
  // await page.screenshot({ path: "1-auth0-login.png", fullPage: true })

  // Press submit on Auth0 form
  await page.click('body > div > main > section > div button[type="submit"]')

  // Wait for next-auth example page login status header to appear
  await page.waitForTimeout(2000)

  // Snap a screenshot
  // await page.screenshot({
  //   path: "2-next-auth-redirect-result.png",
  //   fullPage: false,
  // })

  // Check session object after successful login
  const response = await page.goto(
    "https://next-auth-example.vercel.app/api/auth/session"
  )
  const session = await response?.json()
  expect(session?.user?.email).toBe(process.env.AUTH0_USERNAME)
  // TODO: Check whole object with .toEqual()
})


================================================
FILE: apps/dev/nextjs/tsconfig.json
================================================
{
  "compilerOptions": {
    "target": "esnext",
    "lib": ["dom", "dom.iterable", "esnext"],
    "allowJs": true,
    "skipLibCheck": true,
    "strict": false,
    "forceConsistentCasingInFileNames": true,
    "noEmit": true,
    "esModuleInterop": true,
    "module": "esnext",
    "moduleResolution": "node",
    "resolveJsonModule": true,
    "isolatedModules": true,
    "incremental": true,
    "jsx": "preserve",
    "baseUrl": ".",
    "plugins": [
      {
        "name": "next"
      }
    ],
    "strictNullChecks": true
  },
  "include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"],
  "exclude": ["node_modules"]
}


================================================
FILE: apps/dev/qwik/.gitignore
================================================
# Build
/dist
/lib
/lib-types
/server

# Development
node_modules
*.local

# Cache
.cache
.mf
.rollup.cache
tsconfig.tsbuildinfo

# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
lerna-debug.log*

# Editor
.vscode/*
!.vscode/launch.json
!.vscode/*.code-snippets

.idea
.DS_Store
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?

# Yarn
.yarn/*
!.yarn/releases


================================================
FILE: apps/dev/qwik/README.md
================================================
# Qwik City App ⚡️

- [Qwik Docs](https://qwik.dev/)
- [Discord](https://qwik.dev/chat)
- [Qwik GitHub](https://github.com/QwikDev/qwik)
- [@QwikDev](https://twitter.com/QwikDev)
- [Vite](https://vitejs.dev/)

---

## Project Structure

This project is using Qwik with [QwikCity](https://qwik.dev/qwikcity/overview/). QwikCity is just an extra set of tools on top of Qwik to make it easier to build a full site, including directory-based routing, layouts, and more.

Inside your project, you'll see the following directory structure:

```
├── public/
│   └── ...
└── src/
    ├── components/
    │   └── ...
    └── routes/
        └── ...
```

- `src/routes`: Provides the directory-based routing, which can include a hierarchy of `layout.tsx` layout files, and an `index.tsx` file as the page. Additionally, `index.ts` files are endpoints. Please see the [routing docs](https://qwik.dev/qwikcity/routing/overview/) for more info.

- `src/components`: Recommended directory for components.

- `public`: Any static assets, like images, can be placed in the public directory. Please see the [Vite public directory](https://vitejs.dev/guide/assets.html#the-public-directory) for more info.

## Add Integrations and deployment

Use the `pnpm qwik add` command to add additional integrations. Some examples of integrations includes: Cloudflare, Netlify or Express Server, and the [Static Site Generator (SSG)](https://qwik.dev/qwikcity/guides/static-site-generation/).

```shell
pnpm qwik add # or `pnpm qwik add`
```

## Development

Development mode uses [Vite's development server](https://vitejs.dev/). The `dev` command will server-side render (SSR) the output during development.

```shell
npm start # or `pnpm start`
```

> Note: during dev mode, Vite may request a significant number of `.js` files. This does not represent a Qwik production build.

## Preview

The preview command will create a production build of the client modules, a production build of `src/entry.preview.tsx`, and run a local server. The preview server is only for convenience to preview a production build locally and should not be used as a production server.

```shell
pnpm preview # or `pnpm preview`
```

## Production

The production build will generate client and server modules by running both client and server build commands. The build command will use TypeScript to run a type check on the source code.

```shell
pnpm build # or `pnpm build`
```


================================================
FILE: apps/dev/qwik/package.json
================================================
{
  "name": "qwik-auth-app",
  "description": "Qwik + Auth.js Developer app",
  "engines": {
    "node": "^18.17.0 || ^20.3.0 || >=21.0.0"
  },
  "engines-annotation": "Mostly required by sharp which needs a Node-API v9 compatible runtime",
  "private": true,
  "trustedDependencies": [
    "sharp"
  ],
  "trustedDependencies-annotation": "Needed for bun to allow running install scripts",
  "type": "module",
  "scripts": {
    "build": "qwik build",
    "build.client": "vite build",
    "build.preview": "vite build --ssr src/entry.preview.tsx",
    "build.types": "tsc --incremental --noEmit",
    "deploy": "echo 'Run \"npm run qwik add\" to install a server adapter'",
    "dev": "vite --mode ssr",
    "dev.debug": "node --inspect-brk ./node_modules/vite/bin/vite.js --mode ssr --force",
    "fmt": "prettier --write .",
    "fmt.check": "prettier --check .",
    "preview": "qwik build preview && vite preview --open",
    "start": "vite --open --mode ssr",
    "qwik": "qwik"
  },
  "devDependencies": {
    "@auth/qwik": "workspace:*",
    "@builder.io/qwik": "^1.5.5",
    "@builder.io/qwik-city": "^1.5.5",
    "@types/eslint": "^8.56.10",
    "@types/node": "^20.12.7",
    "@typescript-eslint/eslint-plugin": "^7.7.1",
    "@typescript-eslint/parser": "^7.7.1",
    "eslint": "^8.57.0",
    "eslint-plugin-qwik": "^1.5.5",
    "prettier": "^3.2.5",
    "typescript": "5.4.5",
    "undici": "*",
    "vite": "^5.2.10",
    "vite-tsconfig-paths": "^4.2.1"
  }
}


================================================
FILE: apps/dev/qwik/public/manifest.json
================================================
{
  "$schema": "https://json.schemastore.org/web-manifest-combined.json",
  "name": "qwik-project-name",
  "short_name": "Welcome to Qwik",
  "start_url": ".",
  "display": "standalone",
  "background_color": "#fff",
  "description": "A Qwik project app."
}


================================================
FILE: apps/dev/qwik/public/robots.txt
================================================


================================================
FILE: apps/dev/qwik/qwik.env.d.ts
================================================
// This file can be used to add references for global types like `vite/client`.

// Add global `vite/client` types. For more info, see: https://vitejs.dev/guide/features#client-types
/// <reference types="vite/client" />


================================================
FILE: apps/dev/qwik/src/components/router-head/router-head.tsx
================================================
import { component$ } from "@builder.io/qwik"
import { useDocumentHead, useLocation } from "@builder.io/qwik-city"

/**
 * The RouterHead component is placed inside of the document `<head>` element.
 */
export const RouterHead = component$(() => {
  const head = useDocumentHead()
  const loc = useLocation()

  return (
    <>
      <title>{head.title}</title>

      <link rel="canonical" href={loc.url.href} />
      <meta name="viewport" content="width=device-width, initial-scale=1.0" />
      <link rel="icon" type="image/svg+xml" href="/favicon.svg" />

      {head.meta.map((m) => (
        <meta key={m.key} {...m} />
      ))}

      {head.links.map((l) => (
        <link key={l.key} {...l} />
      ))}

      {head.styles.map((s) => (
        <style
          key={s.key}
          {...s.props}
          {...(s.props?.dangerouslySetInnerHTML
            ? {}
            : { dangerouslySetInnerHTML: s.style })}
        />
      ))}

      {head.scripts.map((s) => (
        <script
          key={s.key}
          {...s.props}
          {...(s.props?.dangerouslySetInnerHTML
            ? {}
            : { dangerouslySetInnerHTML: s.script })}
        />
      ))}
    </>
  )
})


================================================
FILE: apps/dev/qwik/src/entry.dev.tsx
================================================
/*
 * WHAT IS THIS FILE?
 *
 * Development entry point using only client-side modules:
 * - Do not use this mode in production!
 * - No SSR
 * - No portion of the application is pre-rendered on the server.
 * - All of the application is running eagerly in the browser.
 * - More code is transferred to the browser than in SSR mode.
 * - Optimizer/Serialization/Deserialization code is not exercised!
 */
import { render, type RenderOptions } from "@builder.io/qwik"
import Root from "./root"

export default function (opts: RenderOptions) {
  return render(document, <Root />, opts)
}


================================================
FILE: apps/dev/qwik/src/entry.preview.tsx
================================================
/*
 * WHAT IS THIS FILE?
 *
 * It's the bundle entry point for `npm run preview`.
 * That is, serving your app built in production mode.
 *
 * Feel free to modify this file, but don't remove it!
 *
 * Learn more about Vite's preview command:
 * - https://vitejs.dev/config/preview-options.html#preview-options
 *
 */
import { createQwikCity } from "@builder.io/qwik-city/middleware/node"
import qwikCityPlan from "@qwik-city-plan"
// make sure qwikCityPlan is imported before entry
import render from "./entry.ssr"

/**
 * The default export is the QwikCity adapter used by Vite preview.
 */
export default createQwikCity({ render, qwikCityPlan })


================================================
FILE: apps/dev/qwik/src/entry.ssr.tsx
================================================
/**
 * WHAT IS THIS FILE?
 *
 * SSR entry point, in all cases the application is rendered outside the browser, this
 * entry point will be the common one.
 *
 * - Server (express, cloudflare...)
 * - npm run start
 * - npm run preview
 * - npm run build
 *
 */
import {
  renderToStream,
  type RenderToStreamOptions,
} from "@builder.io/qwik/server"
import { manifest } from "@qwik-client-manifest"
import Root from "./root"

export default function (opts: RenderToStreamOptions) {
  return renderToStream(<Root />, {
    manifest,
    ...opts,
    // Use container attributes to set attributes on the html tag.
    containerAttributes: {
      lang: "en-us",
      ...opts.containerAttributes,
    },
    serverData: {
      ...opts.serverData,
    },
  })
}


================================================
FILE: apps/dev/qwik/src/global.css
================================================


================================================
FILE: apps/dev/qwik/src/root.tsx
================================================
import { component$ } from "@builder.io/qwik"
import {
  QwikCityProvider,
  RouterOutlet,
  ServiceWorkerRegister,
} from "@builder.io/qwik-city"
import { RouterHead } from "./components/router-head/router-head"

import "./global.css"

export default component$(() => {
  /**
   * The root of a QwikCity site always start with the <QwikCityProvider> component,
   * immediately followed by the document's <head> and <body>.
   *
   * Don't remove the `<head>` and `<body>` elements.
   */

  return (
    <QwikCityProvider>
      <head>
        <meta charSet="utf-8" />
        <link rel="manifest" href="/manifest.json" />
        <RouterHead />
      </head>
      <body lang="en">
        <RouterOutlet />
        <ServiceWorkerRegister />
      </body>
    </QwikCityProvider>
  )
})


================================================
FILE: apps/dev/qwik/src/routes/index.tsx
================================================
import { component$ } from "@builder.io/qwik"
import { Form, type RequestHandler } from "@builder.io/qwik-city"
import { useSession, useSignIn, useSignOut } from "./plugin@auth"

export const onRequest: RequestHandler = (event) => {
  const session = event.sharedMap.get("session")
  if (!session || new Date(session.expires) < new Date()) {
    console.log("Not authorized. Redirect or throw error here.")
  }
}

export default component$(() => {
  const signIn = useSignIn()
  const signOut = useSignOut()
  const session = useSession()
  return (
    <>
      <Form action={signIn}>
        <input type="hidden" name="providerId" value="github" />
        <input
          type="hidden"
          name="options.redirectTo"
          value="http://qwik-auth-example.com/dashboard"
        />
        <button>Sign In</button>
      </Form>
      Session: {JSON.stringify(session.value)}
      <br />
      <button onClick$={() => signOut.submit({ redirectTo: "/" })}>
        Sign Out
      </button>
    </>
  )
})


================================================
FILE: apps/dev/qwik/src/routes/layout.tsx
================================================
import { component$, Slot } from "@builder.io/qwik"
import type { RequestHandler } from "@builder.io/qwik-city"

export const onGet: RequestHandler = async ({ cacheControl }) => {
  // Control caching for this request for best performance and to reduce hosting costs:
  // https://qwik.dev/docs/caching/
  cacheControl({
    // Always serve a cached response by default, up to a week stale
    staleWhileRevalidate: 60 * 60 * 24 * 7,
    // Max once every 5 seconds, revalidate on the server to get a fresh version of this page
    maxAge: 5,
  })
}

export default component$(() => {
  return <Slot />
})


================================================
FILE: apps/dev/qwik/src/routes/plugin@auth.ts
================================================
import { DefaultSession, QwikAuth$ } from "@auth/qwik"
import GitHub from "@auth/qwik/providers/github"

declare module "@auth/qwik" {
  interface Session {
    user: {
      roles: string[]
    } & DefaultSession["user"]
  }
}

export const { onRequest, useSession, useSignIn, useSignOut } = QwikAuth$(
  () => ({
    providers: [GitHub],
  })
)


================================================
FILE: apps/dev/qwik/src/routes/service-worker.ts
================================================
/*
 * WHAT IS THIS FILE?
 *
 * The service-worker.ts file is used to have state of the art prefetching.
 * https://qwik.dev/qwikcity/prefetching/overview/
 *
 * Qwik uses a service worker to speed up your site and reduce latency, ie, not used in the traditional way of offline.
 * You can also use this file to add more functionality that runs in the service worker.
 */
import { setupServiceWorker } from "@builder.io/qwik-city/service-worker"

setupServiceWorker()

addEventListener("install", () => self.skipWaiting())

addEventListener("activate", () => self.clients.claim())

declare const self: ServiceWorkerGlobalScope


================================================
FILE: apps/dev/qwik/tsconfig.json
================================================
{
  "compilerOptions": {
    "allowJs": true,
    "target": "ES2017",
    "module": "ES2022",
    "lib": ["es2022", "DOM", "WebWorker", "DOM.Iterable"],
    "jsx": "react-jsx",
    "jsxImportSource": "@builder.io/qwik",
    "strict": true,
    "forceConsistentCasingInFileNames": true,
    "resolveJsonModule": true,
    "moduleResolution": "Bundler",
    "esModuleInterop": true,
    "skipLibCheck": true,
    "incremental": true,
    "isolatedModules": true,
    "outDir": "tmp",
    "noEmit": true,
    "paths": {
      "~/*": ["./src/*"]
    }
  },
  "include": ["src", "./*.d.ts", "./*.config.ts"]
}


================================================
FILE: apps/dev/qwik/vite.config.ts
================================================
/**
 * This is the base config for vite.
 * When building, the adapter config is used which loads this file and extends it.
 */
import { qwikCity } from "@builder.io/qwik-city/vite"
import { qwikVite } from "@builder.io/qwik/optimizer"
import { defineConfig, type UserConfig } from "vite"
import tsconfigPaths from "vite-tsconfig-paths"
import pkg from "./package.json"

type PkgDep = Record<string, string>
const { dependencies = {}, devDependencies = {} } = pkg as any as {
  dependencies: PkgDep
  devDependencies: PkgDep
  [key: string]: unknown
}
errorOnDuplicatesPkgDeps(devDependencies, dependencies)

/**
 * Note that Vite normally starts from `index.html` but the qwikCity plugin makes start at `src/entry.ssr.tsx` instead.
 */
export default defineConfig(({ command, mode }): UserConfig => {
  return {
    plugins: [qwikCity(), qwikVite(), tsconfigPaths()],
    // This tells Vite which dependencies to pre-build in dev mode.
    optimizeDeps: {
      // Put problematic deps that break bundling here, mostly those with binaries.
      // For example ['better-sqlite3'] if you use that in server functions.
      exclude: [],
    },

    /**
     * This is an advanced setting. It improves the bundling of your server code. To use it, make sure you understand when your consumed packages are dependencies or dev dependencies. (otherwise things will break in production)
     */
    // ssr:
    //   command === "build" && mode === "production"
    //     ? {
    //         // All dev dependencies should be bundled in the server build
    //         noExternal: Object.keys(devDependencies),
    //         // Anything marked as a dependency will not be bundled
    //         // These should only be production binary deps (including deps of deps), CLI deps, and their module graph
    //         // If a dep-of-dep needs to be external, add it here
    //         // For example, if something uses `bcrypt` but you don't have it as a dep, you can write
    //         // external: [...Object.keys(dependencies), 'bcrypt']
    //         external: Object.keys(dependencies),
    //       }
    //     : undefined,

    server: {
      headers: {
        // Don't cache the server response in dev mode
        "Cache-Control": "public, max-age=0",
      },
    },
    preview: {
      headers: {
        // Do cache the server response in preview (non-adapter production build)
        "Cache-Control": "public, max-age=600",
      },
    },
  }
})

// *** utils ***

/**
 * Function to identify duplicate dependencies and throw an error
 * @param {Object} devDependencies - List of development dependencies
 * @param {Object} dependencies - List of production dependencies
 */
function errorOnDuplicatesPkgDeps(
  devDependencies: PkgDep,
  dependencies: PkgDep
) {
  let msg = ""
  // Create an array 'duplicateDeps' by filtering devDependencies.
  // If a dependency also exists in dependencies, it is considered a duplicate.
  const duplicateDeps = Object.keys(devDependencies).filter(
    (dep) => dependencies[dep]
  )

  // include any known qwik packages
  const qwikPkg = Object.keys(dependencies).filter((value) =>
    /qwik/i.test(value)
  )

  // any errors for missing "qwik-city-plan"
  // [PLUGIN_ERROR]: Invalid module "@qwik-city-plan" is not a valid package
  msg = `Move qwik packages ${qwikPkg.join(", ")} to devDependencies`

  if (qwikPkg.length > 0) {
    throw new Error(msg)
  }

  // Format the error message with the duplicates list.
  // The `join` function is used to represent the elements of the 'duplicateDeps' array as a comma-separated string.
  msg = `
    Warning: The dependency "${duplicateDeps.join(
      ", "
    )}" is listed in both "devDependencies" and "dependencies".
    Please move the duplicated dependencies to "devDependencies" only and remove it from "dependencies"
  `

  // Throw an error with the constructed message.
  if (duplicateDeps.length > 0) {
    throw new Error(msg)
  }
}


================================================
FILE: apps/dev/sveltekit/.env.example
================================================
AUTH_GITHUB_ID=
AUTH_GITHUB_SECRET=
# On UNIX systems you can use `openssl rand -hex 32` or 
# https://generate-secret.vercel.app/32 to generate a secret.
AUTH_SECRET=


================================================
FILE: apps/dev/sveltekit/.eslintignore
================================================
.DS_Store
node_modules
/build
/.svelte-kit
/package
.env
.env.*
!.env.example

# Ignore files for PNPM, NPM and YARN
pnpm-lock.yaml
package-lock.json
yarn.lock


================================================
FILE: apps/dev/sveltekit/.eslintrc.cjs
================================================
module.exports = {
  root: true,
  parser: "@typescript-eslint/parser",
  extends: [
    "eslint:recommended",
    "plugin:@typescript-eslint/recommended",
    "prettier",
  ],
  plugins: ["@typescript-eslint"],
  ignorePatterns: ["*.cjs"],
  overrides: [
    {
      files: ["*.svelte"],
      parser: "svelte-eslint-parser",
      parserOptions: {
        parser: "@typescript-eslint/parser",
      },
    },
  ],
  parserOptions: {
    sourceType: "module",
    ecmaVersion: 2020,
    extraFileExtensions: [".svelte"],
  },
  env: {
    browser: true,
    es2017: true,
    node: true,
  },
}


================================================
FILE: apps/dev/sveltekit/.gitignore
================================================
.DS_Store
node_modules
/build
/.svelte-kit
/package
.env
.env.*
!.env.example
.vercel
.output
vite.config.js.timestamp-*
vite.config.ts.timestamp-*
tmp-unstorage


================================================
FILE: apps/dev/sveltekit/.prettierignore
================================================
.DS_Store
node_modules
/build
/.svelte-kit
/package
.env
.env.*
!.env.example

# Ignore files for PNPM, NPM and YARN
pnpm-lock.yaml
package-lock.json
yarn.lock


================================================
FILE: apps/dev/sveltekit/.prettierrc
================================================
{
  "semi": false,
  "plugins": ["prettier-plugin-svelte"],
  "overrides": [{ "files": "*.svelte", "options": { "parser": "svelte" } }]
}


================================================
FILE: apps/dev/sveltekit/README.md
================================================
> The example repository is maintained from a [monorepo](https://github.com/nextauthjs/next-auth/tree/main/apps/example-sveltekit). Pull Requests should be opened against [`nextauthjs/next-auth`](https://github.com/nextauthjs/next-auth).

<p align="center">
   <br/>
   <a href="https://authjs.dev" target="_blank"><img width="150px" src="https://authjs.dev/img/logo-sm.png" /></a>
   <h3 align="center">Auth.js Example App with <a href="https://kit.svelte.dev">SvelteKit</a></h3>
   <p align="center">
   Open Source. Full Stack. Own Your Data.
   </p>
   <p align="center" style="align: center;">
      <a href="https://npm.im/@auth/sveltekit">
        <img alt="npm" src="https://img.shields.io/npm/v/@auth/sveltekit?color=green&label=@auth/sveltekit&style=flat-square">
      </a>
      <a href="https://bundlephobia.com/result?p=sveltekit-auth-example">
        <img src="https://img.shields.io/bundlephobia/minzip/@auth/sveltekit?label=size&style=flat-square" alt="Bundle Size"/>
      </a>
      <a href="https://www.npmtrends.com/@auth/sveltekit">
        <img src="https://img.shields.io/npm/dm/@auth/sveltekit?label=%20downloads&style=flat-square" alt="Downloads" />
      </a>
      <a href="https://npm.im/next-auth">
        <img src="https://img.shields.io/badge/TypeScript-blue?style=flat-square" alt="TypeScript" />
      </a>
   </p>
</p>

# Documentation

- [sveltekit.authjs.dev](https://sveltekit.authjs.dev)


================================================
FILE: apps/dev/sveltekit/package.json
================================================
{
  "name": "sveltekit-auth-app",
  "version": "1.0.0",
  "description": "SvelteKit + Auth.js Developer app",
  "private": true,
  "scripts": {
    "dev": "vite dev",
    "build": "vite build",
    "preview": "vite preview",
    "check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json",
    "check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch"
  },
  "devDependencies": {
    "@sveltejs/adapter-auto": "next",
    "@sveltejs/kit": "^2.5.7",
    "@sveltejs/vite-plugin-svelte": "^3.0.0",
    "svelte": "^4",
    "svelte-check": "2.10.2",
    "typescript": "5.2.2"
  },
  "dependencies": {
    "@auth/sveltekit": "workspace:*",
    "@auth/unstorage-adapter": "workspace:*",
    "unstorage": "^1.10.2"
  },
  "type": "module"
}


================================================
FILE: apps/dev/sveltekit/src/app.d.ts
================================================
/// <reference types="@auth/sveltekit" />


================================================
FILE: apps/dev/sveltekit/src/app.html
================================================
<!doctype html>
<html lang="en">
  <head>
    <meta charset="utf-8" />
    <link rel="icon" href="%sveltekit.assets%/favicon.ico" />
    <meta name="viewport" content="width=device-width" />
    %sveltekit.head%
  </head>

  <body>
    <div>%sveltekit.body%</div>
  </body>
</html>


================================================
FILE: apps/dev/sveltekit/src/auth.ts
================================================
import { SvelteKitAuth } from "@auth/sveltekit"
import GitHub from "@auth/sveltekit/providers/github"
import Credentials from "@auth/sveltekit/providers/credentials"
import Facebook from "@auth/sveltekit/providers/facebook"
import Discord from "@auth/sveltekit/providers/discord"
import Google from "@auth/sveltekit/providers/google"
import Passkey from "@auth/sveltekit/providers/passkey"
import { createStorage } from "unstorage"
import { UnstorageAdapter } from "@auth/unstorage-adapter"
import fsDriver from "unstorage/drivers/fs"
import { dev } from "$app/environment"

const storage = createStorage({
  driver: fsDriver({ base: "./tmp-unstorage" }),
})

export const { handle, signIn, signOut } = SvelteKitAuth({
  debug: dev ? true : false,
  adapter: UnstorageAdapter(storage),
  experimental: {
    enableWebAuthn: true,
  },
  providers: [
    Credentials({
      credentials: { password: { label: "Password", type: "password" } },
      async authorize(credentials) {
        if (credentials.password !== "password") return null
        return {
          name: "Fill Murray",
          email: "bill@fillmurray.com",
          image: `https://api.dicebear.com/9.x/thumbs/svg?seed=234173&randomizeIds=true`,
          id: "1",
        }
      },
    }),
    GitHub,
    Google,
    Facebook,
    Discord,
    Passkey({
      formFields: {
        email: {
          label: "Username",
          required: true,
          autocomplete: "username webauthn",
        },
      },
    }),
  ],
  theme: {
    logo: "https://authjs.dev/img/logo-sm.png",
  },
})


================================================
FILE: apps/dev/sveltekit/src/components/header.svelte
================================================
<script lang="ts">
  import { page } from "$app/stores"
  import { SignIn, SignOut } from "@auth/sveltekit/components"
</script>

<header>
  <nav class="nojs-show loaded">
    <div class="nav-left">
      <img
        alt="Avatar"
        src={$page.data.session?.user?.image ??
          `https://api.dicebear.com/9.x/thumbs/svg?seed=${Math.floor(Math.random() * 100000) + 1}&randomizeIds=true`}
        class="avatar"
      />
    </div>
    <div class="nav-right">
      {#if $page.data.session}
        <span class="header-text">
          <small>Signed in as</small><br />
          <strong>
            {$page.data.session.user?.email ?? $page.data.session.user?.name}
          </strong>
        </span>
        <SignOut>
          <div class="buttonPrimary" slot="submitButton">Sign out</div>
        </SignOut>
      {:else}
        <span class="header-text">You are not signed in</span>
        <SignIn>
          <div class="buttonPrimary" slot="submitButton">Sign in</div>
        </SignIn>
      {/if}
    </div>
  </nav>
  <div class="links">
    <a class="linkItem" href="/">Home</a>
    <a class="linkItem" href="/protected">Protected</a>
  </div>
</header>


================================================
FILE: apps/dev/sveltekit/src/hooks.server.ts
================================================
export { handle } from "./auth"


================================================
FILE: apps/dev/sveltekit/src/routes/+layout.server.ts
================================================
import type { LayoutServerLoad } from "./$types"

export const load: LayoutServerLoad = async (event) => {
  return {
    session: await event.locals.auth(),
  }
}


================================================
FILE: apps/dev/sveltekit/src/routes/+layout.svelte
================================================
<script lang="ts">
  import Header from "$components/header.svelte"
  import "../style.css"
</script>

<Header />
<slot />


================================================
FILE: apps/dev/sveltekit/src/routes/+page.svelte
================================================
<script lang="ts">
  import { page } from "$app/stores"
  import { SignIn } from "@auth/sveltekit/components"
  import { signIn } from "@auth/sveltekit/client"

  let password = ""
</script>

<h1>SvelteKit Auth Example</h1>
<div class="container">
  <p>
    This is an example site to demonstrate how to use
    <a href="https://kit.svelte.dev/">SvelteKit</a>
    with <a href="https://sveltekit.authjs.dev">SvelteKit Auth</a> for authentication.
  </p>

  <div class="session-code">
    <div class="session-code-header">
      <h3>Session</h3>
    </div>
    <div class="session-code-body">
      <pre>
{JSON.stringify($page.data.session, null, 2)}
      </pre>
    </div>
  </div>

  <div class="login-cards">
    <div class="card">
      <div class="card-header">
        <h3>Server</h3>
      </div>
      <div class="card-body">
        <p>
          These actions are all using the components exported from
          <code>@auth/sveltekit/components</code> to run via form actions.
        </p>
        <div class="actions">
          <SignIn provider="github">
            <span slot="submitButton">
              <img
                src="https://authjs.dev/img/providers/github.svg"
                alt="GitHub Logo"
                width="20"
                height="20"
              />
              GitHub
            </span>
          </SignIn>
          <SignIn provider="discord">
            <span slot="submitButton">
              <img
                src="https://authjs.dev/img/providers/discord.svg"
                alt="Discord Logo"
                width="20"
                height="20"
              />
              Discord
            </span>
          </SignIn>
          <div class="or-split">or</div>
          <SignIn provider="credentials">
            <span slot="submitButton">Sign In with Credentials</span>
            <div slot="credentials" style="width: 100%;">
              <div class="wrapper-form" style="width: 100%;">
                <div class="input-wrapper">
                  <label for="server-password">Password</label>
                  <input
                    type="password"
                    id="server-password"
                    name="password"
                    placeholder="password"
                    required
                  />
                </div>
              </div>
            </div>
          </SignIn>
        </div>
      </div>
    </div>
    <div class="card">
      <div class="card-header">
        <h3>Client</h3>
      </div>
      <div class="card-body">
        <p>
          These actions are all using the methods exported from
          <code>@auth/sveltekit/client</code>
        </p>
        <div class="actions">
          <div class="wrapper-form social-btn">
            <button on:click={() => signIn("github")}>
              <img
                src="https://authjs.dev/img/providers/github.svg"
                alt="GitHub Logo"
                width="20"
                height="20"
              />
              GitHub
            </button>
          </div>
          <div class="wrapper-form social-btn">
            <button on:click={() => signIn("discord")}>
              <img
                src="https://authjs.dev/img/providers/discord.svg"
                alt="Discord Logo"
                width="20"
                height="20"
              />
              Discord
            </button>
          </div>
          <div class="or-split">or</div>
          <div class="wrapper-form">
            <div class="input-wrapper">
              <label for="client-password">Password</label>
              <input
                bind:value={password}
                type="password"
                placeholder="password"
                id="client-password"
                name="password"
                required
              />
            </div>
            <button on:click={() => signIn("credentials", { password })}>
              Sign In with Credentials
            </button>
          </div>
        </div>
      </div>
    </div>
  </div>
</div>


================================================
FILE: apps/dev/sveltekit/src/routes/protected/+page.svelte
================================================
<script lang="ts">
  import { page } from "$app/stores"
</script>

{#if $page.data.session}
  <h1>Protected page</h1>
  <p>
    This is a protected content. You can access this content because you are
    signed in.
  </p>
  <p>Session expiry: {$page.data.session?.expires}</p>
{:else}
  <h1>Access Denied</h1>
{/if}


================================================
FILE: apps/dev/sveltekit/src/routes/signin/+page.server.ts
================================================
import { signIn } from "$/auth"
import type { Actions } from "./$types"

export const actions = { default: signIn } satisfies Actions


================================================
FILE: apps/dev/sveltekit/src/routes/signout/+page.server.ts
================================================
import { signOut } from "$/auth"
import type { Actions } from "./$types"

export const actions = { default: signOut } satisfies Actions


================================================
FILE: apps/dev/sveltekit/src/style.css
================================================
body {
  font-family:
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    Roboto,
    "Helvetica Neue",
    Arial,
    "Noto Sans",
    sans-serif,
    "Apple Color Emoji",
    "Segoe UI Emoji",
    "Segoe UI Symbol",
    "Noto Color Emoji";
  max-width: 960px;
  margin: 0 auto;
  background: #fff;
  color: var(--color-text);
  height: 100dvh;
  display: flex;
  flex-direction: column;
}

code {
  background: #ddd;
  padding: 6px;
  border-radius: 0.25rem;
}

li,
p {
  line-height: 1.5rem;
  margin: 0;
}

a {
  font-weight: 500;
}

iframe {
  background: #ccc;
  border: 1px solid #ccc;
  height: 10rem;
  width: 100%;
  border-radius: 0.5rem;
  filter: invert(1);
}

h1,
h2,
h3,
h4,
h5,
h6 {
  margin: 0px;
}

main {
  flex-grow: 1;

  @media screen and (max-width: 960px) {
    padding: 0 1rem;
  }
}

/* Index Page Cards */
.container {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: stretch;
  justify-content: flex-start;
}

.session-code {
  background-color: #f3f3f3;
  border-radius: 0.75rem;
  display: flex;
  flex-direction: column;
  justify-content: start;

  .session-code-header {
    border-radius: 0.75rem 0.75rem 0 0;
    background-color: #dfdfdf;
    padding: 1.1rem;
  }

  .session-code-body {
    display: flex;
    flex-direction: column;
    padding: 1.1rem;
    gap: 2rem;
  }
}

.login-cards {
  display: flex;
  gap: 2rem;
}

.card {
  width: calc(50% - 1rem);
  border-radius: 0.75rem;
  background-color: #f3f3f3;
  display: flex;
  flex-direction: column;

  .card-header {
    border-radius: 0.75rem 0.75rem 0 0;
    margin: 0 !important;
    background-color: #dfdfdf;
    padding: 1.1rem;
  }

  .card-body {
    display: flex;
    flex-direction: column;
    height: 100%;
    justify-content: space-between;
    color: #555;

    .actions {
      display: flex;
      align-items: flex-end;
      justify-content: center;
      flex-wrap: wrap;
      gap: 1rem;

      & > div:last-of-type {
        flex-basis: 100%;
      }

      & > form:last-of-type {
        flex-basis: 100%;
      }
    }

    .or-split {
      text-align: center;
      display: flex;
      align-items: center;
      justify-content: space-around;
      width: 100%;

      &::before,
      &::after {
        display: flex;
        content: "";
        width: 40%;
        border-top: 1px solid #cccccc80;
      }
    }

    .wrapper-form,
    form {
      border-radius: 0.35rem;
      display: flex;
      gap: 0.5rem;
      flex-direction: column;
      justify-content: end;
      align-items: start;
      width: calc(50% - 0.5rem);

      button {
        width: 100%;
      }

      .input-wrapper {
        width: 100%;
      }

      input::placeholder {
        color: #ccc;
      }
    }

    .signInButton button,
    .social-btn button {
      padding: 0.5rem;
      display: flex;
      gap: 1rem;
      justify-content: center;
      align-items: center;
    }

    .signInButton button span {
      display: flex;
      gap: 1rem;
      align-items: center;
    }

    &:has(button) {
      padding: 1.1rem;
    }
  }

  .card-footer {
    padding: 1.1rem;
    padding-top: 0;
    color: #777;
    font-style: italic;
  }

  pre {
    background-color: #ccc;
    padding: 1rem;
    border-radius: 0.5rem;
    word-break: break-all;
    white-space: pre-wrap;
  }

  .btn-wrapper {
    display: flex;
    gap: 1rem;
  }

  button {
    justify-self: end;
    font-weight: 500;
    border-radius: 0.25rem;
    border: none;
    font-weight: bold;
    cursor: pointer;
    font-size: 1rem;
    line-height: 1.4rem;
    padding: 0.7rem 0.8rem;
    position: relative;
    z-index: 10;
    background-color: #bbb;
    color: black;
    text-decoration: none;
    padding: 0.7rem 1.4rem;
    transition: all 250ms;
  }

  button:hover {
    background-color: #aaa;
  }
}

.input-wrapper {
  display: flex;
  gap: 0.5rem;
  justify-content: start;
  align-items: center;

  label {
    width: 8rem;
    font-size: 1.1rem;
  }

  input {
    border-radius: 0.25rem;
    padding: 0.5rem;
    border: #ccc solid 1px;
    font-size: 1.05rem;
    width: 100%;
  }
}

/* Header */
header {
  display: flex;
  flex-direction: column;
  align-items: center;
  border-radius: 0 0 0.6rem 0.6rem;
  margin-bottom: 2rem;

  nav {
    width: 100%;
    background-color: #f3f3f3;
    display: flex;
    padding: 1rem 0;
    justify-content: space-between;
    align-items: center;

    button {
      border: 0;
    }

    .nav-left {
      display: flex;
      padding: 0 1rem;
    }

    .nav-right {
      display: flex;
      padding: 0 1rem;
      justify-content: end;
      align-items: center;
    }
  }

  .links {
    display: flex;
    padding: 0;
    margin: 0;
    list-style: none;
    display: flex;
    width: 100%;
    gap: 0.5rem;
    flex-wrap: wrap;

    .linkItem {
      flex-grow: 1;
      display: inline-block;
      text-align: center;
      background-color: #d5d5d5;
      border-radius: 0 0 0.5rem 0.5rem;
      padding: 1rem 0 1rem 0;
      text-decoration: none;
      color: black;
      transition: all 250ms;
    }

    .linkItem:hover {
      background-color: #ccc;
    }
  }

  .header-text {
    font-size: 1.05rem;
    margin-right: 1rem;
  }

  .avatar {
    border-radius: 2rem;
    float: left;
    height: 2.8rem;
    width: 2.8rem;
    margin-right: 1rem;
    background-color: white;
    background-size: cover;
    background-repeat: no-repeat;
  }

  .button,
  .buttonPrimary {
    font-weight: 500;
    border-radius: 0.3rem;
    font-weight: bold;
    cursor: pointer;
    font-size: 1rem;
    line-height: 1.4rem;
    padding: 0.7rem 0.8rem;
    position: relative;
    background-color: transparent;
    color: #555;
  }

  .buttonPrimary {
    background-color: #346df1;
    border-color: #346df1;
    color: #fff;
    text-decoration: none;
    padding: 0.7rem 1.4rem;
  }

  .buttonPrimary:hover {
    box-shadow: inset 0 0 5rem rgba(0, 0, 0, 0.2);
  }

  @media screen and (max-width: 960px) {
    padding: 0 1rem;
  }
}


================================================
FILE: apps/dev/sveltekit/svelte.config.js
================================================
import adapter from "@sveltejs/adapter-auto"
import { vitePreprocess } from "@sveltejs/vite-plugin-svelte"

/** @type {import('@sveltejs/kit').Config} */
const config = {
  // Consult https://kit.svelte.dev/docs/integrations#preprocessors
  // for more information about preprocessors
  preprocess: vitePreprocess(),

  kit: {
    adapter: adapter(),
    alias: {
      $: "src",
      $components: "src/components",
      $lib: "src/lib",
    },
  },
}

export default config


================================================
FILE: apps/dev/sveltekit/tsconfig.json
================================================
{
  "extends": "./.svelte-kit/tsconfig.json",
  "compilerOptions": {
    "allowJs": true,
    "checkJs": true,
    "esModuleInterop": true,
    "forceConsistentCasingInFileNames": true,
    "resolveJsonModule": true,
    "skipLibCheck": true,
    "sourceMap": true,
    "strict": true
  }
  // Path aliases are handled by https://kit.svelte.dev/docs/configuration#alias
  //
  // If you want to overwrite includes/excludes, make sure to copy over the relevant includes/excludes
  // from the referenced tsconfig.json - TypeScript does not merge them in
}


================================================
FILE: apps/dev/sveltekit/vite.config.js
================================================
import { defineConfig } from "vite"
import { sveltekit } from "@sveltejs/kit/vite"

export default defineConfig({
  server: {
    port: 3000,
  },
  plugins: [sveltekit()],
})


================================================
FILE: apps/examples/express/.eslintrc.cjs
================================================
module.exports = {
  root: true,
  env: {
    browser: true,
    es2021: true,
  },
  extends: ["eslint:recommended", "plugin:@typescript-eslint/recommended"],
  overrides: [
    {
      env: {
        node: true,
      },
      files: [".eslintrc.{js,cjs}"],
      parserOptions: {
        sourceType: "script",
      },
    },
  ],
  parser: "@typescript-eslint/parser",
  parserOptions: {
    ecmaVersion: "latest",
    sourceType: "module",
  },
  plugins: ["@typescript-eslint"],
  rules: {},
}


================================================
FILE: apps/examples/express/.gitignore
================================================
# API keys and secrets
.env

# Dependency directory
node_modules

# Editors
.idea
*.iml
.vscode/settings.json

# OS metadata
.DS_Store
Thumbs.db

# Ignore built ts files
dist/**/*

# Ignore built css files
/public/css/output.css



================================================
FILE: apps/examples/express/.prettierignore
================================================

.DS_Store
node_modules
/dist
/.turbo
/package
.env
.env.*
!.env.example

# Ignore files for PNPM, NPM and YARN
pnpm-lock.yaml
package-lock.json
yarn.lock


================================================
FILE: apps/examples/express/.prettierrc
================================================
{
  "semi": false,
  "plugins": ["@prettier/plugin-pug", "prettier-plugin-tailwindcss"],
  "pugClassNotation": "attribute"
}


================================================
FILE: apps/examples/express/README.md
================================================
> The example repository is maintained from a [monorepo](https://github.com/nextauthjs/next-auth/tree/main/apps/examples/express). Pull Requests should be opened against [`nextauthjs/next-auth`](https://github.com/nextauthjs/next-auth).

<p align="center">
   <br/>
   <a href="https://authjs.dev" target="_blank">
   <img height="64" src="https://authjs.dev/img/logo-sm.png" />
   </a>
   <a href="https://expressjs.com" target="_blank">
   <img height="64" src="https://i.cloudup.com/zfY6lL7eFa-3000x3000.png" />
   </a>
   <h3 align="center"><b>Express Auth</b> - Example App</h3>
   <p align="center">
   Open Source. Full Stack. Own Your Data.
   </p>
   <p align="center" style="align: center;">
      <a href="https://npm.im/@auth/express">
        <img alt="npm" src="https://img.shields.io/npm/v/@auth/express?color=green&label=@auth/express&style=flat-square">
      </a>
      <a href="https://bundlephobia.com/result?p=@auth/express">
        <img src="https://img.shields.io/bundlephobia/minzip/@auth/express?label=size&style=flat-square" alt="Bundle Size"/>
      </a>
      <a href="https://www.npmtrends.com/@auth/express">
        <img src="https://img.shields.io/npm/dm/@auth/express?label=downloads&style=flat-square" alt="Downloads" />
      </a>
      <a href="https://npm.im/@auth/express">
        <img src="https://img.shields.io/badge/TypeScript-blue?style=flat-square" alt="TypeScript" />
      </a>
   </p>
</p>

## Overview

This is the official Express Auth example for [Auth.js](https://express.authjs.dev).

## Getting started

You can instantly deploy this example to [Vercel](https://vercel.com?utm_source=github&utm_medium=readme&utm_campaign=express-auth-example) by clicking the following button.

[![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/new/git/external?repository-url=https://github.com/nextauthjs/express-auth-example&project-name=express-auth-example&repository-name=express-auth-example)

## Environment Variables

Once deployed, kindly ensure you set all [required environment variables](https://authjs.dev/getting-started/deployment#environment-variables) in the `Environment` section of your hosting service.

## Node.js Compatibility

The recommended version of Node.js to use in this example is Node.js v20.0.0.

If you are using a version of Node.js lower than this (for example the minimum supported node version v18.0.0), you may need to enable Web Crypto API via the `--experimental-webcrypto` flag in the `start` and `dev` scripts of your `package.json` file.

Instead of using the experimental flag, you may use the following polyfill:

```ts
// polyfill.cjs
globalThis.crypto ??= require("crypto").webcrypto
```

And then import it within a top-level file in the application:

```ts
// server.ts
import "./polyfill.cjs"
```


================================================
FILE: apps/examples/express/api/index.js
================================================
const { app } = await import("../src/app.js")

export default app


================================================
FILE: apps/examples/express/package.json
================================================
{
  "description": "Express Auth example app",
  "engines": {
    "node": ">=20.11.0"
  },
  "type": "module",
  "private": true,
  "scripts": {
    "start": "node dist/server.js",
    "clean": "rm -rf dist",
    "build": "pnpm build:ts && pnpm build:css",
    "build:ts": "tsc",
    "build:css": "tailwindcss -i ./public/css/style.css -o ./public/css/output.css",
    "dev": "tsx watch --env-file=.env src/server.ts & pnpm build:css -w",
    "lint": "eslint src/*.ts --fix",
    "prettier": "prettier src/*.ts --write"
  },
  "author": "Rexford Essilfie <rexfordessilfie09@gmail.com>",
  "license": "ISC",
  "dependencies": {
    "@auth/express": "latest",
    "express": "^4.19.2",
    "morgan": "^1.10.0",
    "pug": "^3.0.2",
    "tailwindcss": "^3.4.3"
  },
  "devDependencies": {
    "@types/express": "^4.17.21",
    "@types/morgan": "^1.9.9",
    "@types/node": "^20.12.7",
    "@types/pug": "^2.0.10",
    "tsx": "^4.7.0",
    "typescript": "5.3.3"
  }
}


================================================
FILE: apps/examples/express/public/css/style.css
================================================
@tailwind base;
@tailwind components;
@tailwind utilities;


================================================
FILE: apps/examples/express/src/app.ts
================================================
// @ts-nocheck
import express, { type Request, type Response } from "express"
import logger from "morgan"
import * as path from "node:path"
import {
  errorHandler,
  errorNotFoundHandler,
} from "./middleware/error.middleware.js"
import {
  authenticatedUser,
  currentSession,
} from "./middleware/auth.middleware.js"

import { ExpressAuth } from "@auth/express"
import { authConfig } from "./config/auth.config.js"
import * as pug from "pug"

export const app = express()

app.set("port", process.env.PORT || 3000)

// @ts-expect-error (https://stackoverflow.com/questions/45342307/error-cannot-find-module-pug)
app.engine("pug", pug.__express)
app.set("views", path.join(import.meta.dirname, "..", "views"))
app.set("view engine", "pug")

// Trust Proxy for Proxies (Heroku, Render.com, Docker behind Nginx, etc)
// https://stackoverflow.com/questions/40459511/in-express-js-req-protocol-is-not-picking-up-https-for-my-secure-link-it-alwa
app.set("trust proxy", true)

app.use(logger("dev"))

// Serve static files
// NB: Uncomment this out if you want Express to serve static files for you vs. using a
// hosting provider which does so for you (for example through a CDN).
app.use(express.static(path.join(import.meta.dirname, "..", "public")))

// Parse incoming requests data
app.use(express.urlencoded({ extended: true }))
app.use(express.json())

// Set session in res.locals
app.use(currentSession)

// Set up ExpressAuth to handle authentication
// IMPORTANT: It is highly encouraged set up rate limiting on this route
app.use("/api/auth/*", ExpressAuth(authConfig))

// Routes
app.get("/protected", async (_req: Request, res: Response) => {
  res.render("protected", { session: res.locals.session })
})

app.get(
  "/api/protected",
  authenticatedUser,
  async (_req: Request, res: Response) => {
    res.json(res.locals.session)
  },
)

app.get("/", async (_req: Request, res: Response) => {
  res.render("index", {
    title: "Express Auth Example",
    user: res.locals.session?.user,
  })
})

// Error handlers
app.use(errorNotFoundHandler)
app.use(errorHandler)


================================================
FILE: apps/examples/express/src/config/auth.config.ts
================================================
import Apple from "@auth/express/providers/apple"
import Auth0 from "@auth/express/providers/auth0"
import AzureB2C from "@auth/express/providers/azure-ad-b2c"
import BoxyHQSAML from "@auth/express/providers/boxyhq-saml"
import Cognito from "@auth/express/providers/cognito"
import Coinbase from "@auth/express/providers/coinbase"
import Discord from "@auth/express/providers/discord"
import Dropbox from "@auth/express/providers/dropbox"
import Facebook from "@auth/express/providers/facebook"
import GitHub from "@auth/express/providers/github"
import GitLab from "@auth/express/providers/gitlab"
import Google from "@auth/express/providers/google"
import Hubspot from "@auth/express/providers/hubspot"
import Keycloak from "@auth/express/providers/keycloak"
import LinkedIn from "@auth/express/providers/linkedin"
import Netlify from "@auth/express/providers/netlify"
import Okta from "@auth/express/providers/okta"
import Passage from "@auth/express/providers/passage"
import Pinterest from "@auth/express/providers/pinterest"
import Reddit from "@auth/express/providers/reddit"
import Slack from "@auth/express/providers/slack"
import Spotify from "@auth/express/providers/spotify"
import Twitch from "@auth/express/providers/twitch"
import Twitter from "@auth/express/providers/twitter"
import WorkOS from "@auth/express/providers/workos"
import Zoom from "@auth/express/providers/zoom"

export const authConfig = {
  trustHost: true,
  providers: [
    Apple,
    Auth0,
    AzureB2C({
      clientId: process.env.AUTH_AZURE_AD_B2C_ID,
      clientSecret: process.env.AUTH_AZURE_AD_B2C_SECRET,
      issuer: process.env.AUTH_AZURE_AD_B2C_ISSUER,
    }),
    BoxyHQSAML({
      clientId: "dummy",
      clientSecret: "dummy",
      issuer: process.env.AUTH_BOXYHQ_SAML_ISSUER,
    }),
    Cognito,
    Coinbase,
    Discord,
    Dropbox,
    Facebook,
    GitHub,
    GitLab,
    Google,
    Hubspot,
    Keycloak,
    LinkedIn,
    Netlify,
    Okta,
    Passage,
    Pinterest,
    Reddit,
    Slack,
    Spotify,
    Twitch,
    Twitter,
    WorkOS({
      connection: process.env.AUTH_WORKOS_CONNECTION!,
    }),
    Zoom,
  ],
}


================================================
FILE: apps/examples/express/src/errors.ts
================================================
export class HttpError extends Error {
  status: number
  constructor(status: number, message: string) {
    super(message)
    this.status = status
  }
}

export class NotFoundError extends HttpError {
  constructor(message: string, status = 404) {
    super(status, message)
    this.name = "NotFoundError"
  }
}


================================================
FILE: apps/examples/express/src/middleware/auth.middleware.ts
================================================
// @ts-nocheck
import { getSession } from "@auth/express"
import { authConfig } from "../config/auth.config.js"
import type { NextFunction, Request, Response } from "express"

export async function authenticatedUser(
  req: Request,
  res: Response,
  next: NextFunction,
) {
  const session =
    res.locals.session ?? (await getSession(req, authConfig)) ?? undefined

  res.locals.session = session

  if (session) {
    return next()
  }

  res.status(401).json({ message: "Not Authenticated" })
}

export async function currentSession(
  req: Request,
  res: Response,
  next: NextFunction,
) {
  const session = (await getSession(req, authConfig)) ?? undefined
  res.locals.session = session
  return next()
}


================================================
FILE: apps/examples/express/src/middleware/error.middleware.ts
================================================
// @ts-nocheck
import type { NextFunction, Request, Response } from "express"
import { HttpError, NotFoundError } from "../errors.js"

export const errorHandler = (
  err: HttpError | Error,
  _req: Request,
  res: Response,
  _next: NextFunction,
): void => {
  // Render the error page
  res.status(("status" in err && err.status) || 500)
  res.render("error", {
    title: "status" in err ? err.status : err.name,
    message: err.message,
  })
}

export const errorNotFoundHandler = (
  _req: Request,
  _res: Response,
  next: NextFunction,
): void => {
  next(new NotFoundError("Not Found"))
}


================================================
FILE: apps/examples/express/src/server.ts
================================================
const { app } = await import("./app.js")

const port = app.get("port")

const server = app.listen(port, () => {
  console.log(`Listening on port ${port}`)
})

export default server


================================================
FILE: apps/examples/express/tailwind.config.js
================================================
/** @type {import('tailwindcss').Config} */
export default {
  content: ["./src/*.{html,js,css}", "./views/*.pug"],
  theme: {
    extend: {},
  },
  plugins: [],
}


================================================
FILE: apps/examples/express/tsconfig.json
================================================
{
  "compilerOptions": {
    "module": "NodeNext",
    "esModuleInterop": true,
    "target": "esnext",
    "noImplicitAny": true,
    "moduleResolution": "NodeNext",
    "sourceMap": true,
    "outDir": "dist",
    "baseUrl": ".",
    "skipLibCheck": true,
    "strict": true,
    "typeRoots": ["types/", "node_modules/@types"]
  },
  "include": ["src/**/*.ts"],
  "exclude": ["node_modules"]
}


================================================
FILE: apps/examples/express/types/express/index.d.ts
================================================
import { type Session } from "@auth/express"

declare module "express" {
  interface Response {
    locals: {
      session?: Session
    }
  }
}


================================================
FILE: apps/examples/express/vercel.json
================================================
{
  "$schema": "https://openapi.vercel.sh/vercel.json",
  "rewrites": [{ "source": "/(.*)", "destination": "/api" }]
}


================================================
FILE: apps/examples/express/views/error.pug
================================================
extends layout

block content
  h1(class="text-3xl font-bold")= title
  p= message


================================================
FILE: apps/examples/express/views/index.pug
================================================
extends layout

block content
  h1(class="text-3xl font-bold")= title
  p
    | This is an example site to demonstrate how to use #{ ' ' }
    a(href="https://expressjs.com/", class="mb-2 font-medium underline") Express
    | #{ ' ' } with #{ ' ' }
    a(href="https://authjs.dev/reference/express", class="underline") Express Auth
    |
    | for authentication.


================================================
FILE: apps/examples/express/views/layout.pug
================================================
doctype html
html
  head
    title= title
    link(rel="stylesheet", href="/css/output.css")
    meta(name="viewport", content="width=device-width, initial-scale=1.0")
  body(class="flex flex-col items-center")
    div(class="flex w-[90%] max-w-2xl flex-col justify-start gap-2")
      div(
        class="mb-2 flex items-center justify-between gap-2 rounded-b-md bg-gray-100 p-2 pl-4"
      )
        if session
          div(class="flex flex-row items-center gap-2")
            if session.user.image
              img(src=`${session.user.image}`, class="h-8 w-8 rounded-full")
            span
              | Signed in as #{ ' ' }
              strong= session.user.email || session.user.name
          a(
            class="rounded-md bg-blue-600 px-5 py-2.5 font-medium text-white",
            href="/api/auth/signout"
          ) Sign out
        else
          span(class="") You are not signed in
          a#sign-indiv(
            ,
            class="rounded-md bg-blue-600 px-5 py-2.5 font-medium text-white",
            href="/api/auth/signin"
          ) Sign in

      nav(class="mb-4")
        ul(class="flex flex-row gap-4 underline")
          li
            a(href="/") Home
          li
            a(href="/protected") Protected
          li
            a(href="/api/protected") Protected (API)

      block content


================================================
FILE: apps/examples/express/views/protected.pug
================================================
extends layout

block content
  if session
    h1(class="mb-2 text-3xl font-medium") Protected page
    p
      | This is a protected content. You can access this content because you are
      | signed in.
    p Session expiry: #{ session.expires ? session.expires : '' }
  else
    h1(class="mb-2 text-3xl font-medium") Access Denied
    p
      | You must be #{ ' ' }
      a(href="/api/auth/signin", class="underline") signed in
      | #{ ' ' } to view this page


================================================
FILE: apps/examples/nextjs/.gitignore
================================================
.DS_Store

node_modules/
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
lerna-debug.log*
.yarn-integrity
.npm

.eslintcache

*.tsbuildinfo
next-env.d.ts

.next
.vercel
.env*.local

================================================
FILE: apps/examples/nextjs/Dockerfile
================================================
# syntax=docker/dockerfile:1
FROM node:20-alpine AS base

# Install dependencies only when needed
FROM base AS deps
# Check https://github.com/nodejs/docker-node/tree/b4117f9333da4138b03a546ec926ef50a31506c3#nodealpine to understand why libc6-compat might be needed.
RUN apk add --no-cache libc6-compat
WORKDIR /app

# Install dependencies
COPY package.json pnpm-lock.yaml* ./
RUN corepack enable pnpm && pnpm i --frozen-lockfile

# Rebuild the source code only when needed
FROM base AS builder
WORKDIR /app
COPY --from=deps /app/node_modules ./node_modules
COPY . .

# Next.js collects completely anonymous telemetry data about general usage.
# Learn more here: https://nextjs.org/telemetry
# Uncomment the following line in case you want to disable telemetry during the build.
# ENV NEXT_TELEMETRY_DISABLED 1

RUN corepack enable pnpm && pnpm build

# Production image, copy all the files and run next
FROM base AS runner
WORKDIR /app

ENV NODE_ENV production
# Uncomment the following line in case you want to disable telemetry during runtime.
# ENV NEXT_TELEMETRY_DISABLED 1

RUN addgroup --system --gid 1001 nodejs
RUN adduser --system --uid 1001 nextjs

COPY --from=builder /app/public ./public

# Set the correct permission for prerender cache
RUN mkdir .next
RUN chown nextjs:nodejs .next

# Automatically leverage output traces to reduce image size
# https://nextjs.org/docs/advanced-features/output-file-tracing
COPY --from=builder --chown=nextjs:nodejs /app/.next/standalone ./
COPY --from=builder --chown=nextjs:nodejs /app/.next/static ./.next/static

USER nextjs

EXPOSE 3000

ENV PORT 3000
ENV HOSTNAME "0.0.0.0"

# server.js is created by next build from the standalone output
# https://nextjs.org/docs/pages/api-reference/next-config-js/output
CMD ["node", "server.js"]


================================================
FILE: apps/examples/nextjs/README.md
================================================
> The example repository is maintained from a [monorepo](https://github.com/nextauthjs/next-auth/tree/main/apps/examples/nextjs). Pull Requests should be opened against [`nextauthjs/next-auth`](https://github.com/nextauthjs/next-auth).

<p align="center">
   <br/>
   <a href="https://authjs.dev" target="_blank"><img width="150px" src="https://authjs.dev/img/logo-sm.png" /></a>
   <h3 align="center">NextAuth.js Example App</h3>
   <p align="center">
   Open Source. Full Stack. Own Your Data.
   </p>
   <p align="center" style="align: center;">
      <a href="https://npm.im/next-auth">
        <img alt="npm" src="https://img.shields.io/npm/v/next-auth?color=green&label=next-auth">
      </a>
      <a href="https://bundlephobia.com/result?p=next-auth-example">
        <img src="https://img.shields.io/bundlephobia/minzip/next-auth?label=next-auth" alt="Bundle Size"/>
      </a>
      <a href="https://www.npmtrends.com/next-auth">
        <img src="https://img.shields.io/npm/dm/next-auth?label=next-auth%20downloads" alt="Downloads" />
      </a>
      <a href="https://npm.im/next-auth">
        <img src="https://img.shields.io/badge/npm-TypeScript-blue" alt="TypeScript" />
      </a>
   </p>
</p>

## Overview

NextAuth.js is a complete open source authentication solution.

This is an example application that shows how `next-auth` is applied to a basic Next.js app.

The deployed version can be found at [`next-auth-example.vercel.app`](https://next-auth-example.vercel.app)

### About NextAuth.js

NextAuth.js is an easy to implement, full-stack (client/server) open source authentication library originally designed for [Next.js](https://nextjs.org) and [Serverless](https://vercel.com). Our goal is to [support even more frameworks](https://github.com/nextauthjs/next-auth/issues/2294) in the future.

Go to [next-auth.js.org](https://authjs.dev) for more information and documentation.

> _NextAuth.js is not officially associated with Vercel or Next.js._

## Getting Started

### 1. Clone the repository and install dependencies

```
git clone https://github.com/nextauthjs/next-auth-example.git
cd next-auth-example
pnpm install
```

### 2. Configure your local environment

Copy the .env.local.example file in this directory to .env.local (which will be ignored by Git):

```
cp .env.local.example .env.local
```

Add details for one or more providers (e.g. Google, Twitter, GitHub, Email, etc).

#### Database

A database is needed to persist user accounts and to support email sign in. However, you can still use NextAuth.js for authentication without a database by using OAuth for authentication. If you do not specify a database, [JSON Web Tokens](https://jwt.io/introduction) will be enabled by default.

You **can** skip configuring a database and come back to it later if you want.

For more information about setting up a database, please check out the following links:

- Docs: [authjs.dev/reference/core/adapters](https://authjs.dev/reference/core/adapters)

### 3. Configure Authentication Providers

1. Review and update options in `auth.ts` as needed.

2. When setting up OAuth, in the developer admin page for each of your OAuth services, you should configure the callback URL to use a callback path of `{server}/api/auth/callback/{provider}`.

e.g. For Google OAuth you would use: `http://localhost:3000/api/auth/callback/google`

A list of configured providers and their callback URLs is available from the endpoint `api/auth/providers`. You can find more information at https://authjs.dev/getting-started/providers/oauth-tutorial

1. You can also choose to specify an SMTP server for passwordless sign in via email.

### 4. Start the application

To run your site locally, use:

```
pnpm run dev
```

To run it in production mode, use:

```
pnpm run build
pnpm run start
```

### 5. Preparing for Production

Follow the [Deployment documentation](https://authjs.dev/getting-started/deployment)

## License

ISC


================================================
FILE: apps/examples/nextjs/app/[...proxy]/route.tsx
================================================
import { auth } from "@/auth"
import { NextRequest } from "next/server"

// Review if we need this, and why
function stripContentEncoding(result: Response) {
  const responseHeaders = new Headers(result.headers)
  responseHeaders.delete("content-encoding")

  return new Response(result.body, {
    status: result.status,
    statusText: result.statusText,
    headers: responseHeaders,
  })
}

async function handler(request: NextRequest) {
  const session = await auth()

  const headers = new Headers(request.headers)
  headers.set("Authorization", `Bearer ${session?.accessToken}`)

  let backendUrl =
    process.env.THIRD_PARTY_API_EXAMPLE_BACKEND ??
    "https://third-party-backend.authjs.dev"

  let url = request.nextUrl.href.replace(request.nextUrl.origin, backendUrl)
  let result = await fetch(url, { headers, body: request.body })

  return stripContentEncoding(result)
}

export const dynamic = "force-dynamic"

export { handler as GET, handler as POST }


================================================
FILE: apps/examples/nextjs/app/api/protected/route.ts
================================================
import { auth } from "auth"

export const GET = auth((req) => {
  if (req.auth) {
    return Response.json({ data: "Protected data" })
  }

  return Response.json({ message: "Not authenticated" }, { status: 401 })
})


================================================
FILE: apps/examples/nextjs/app/api-example/page.tsx
================================================
"use client"
import CustomLink from "@/components/custom-link"
import { useEffect, useState } from "react"

export default function Page() {
  const [data, setData] = useState()
  useEffect(() => {
    ;(async () => {
      const res = await fetch("/api/protected")
      const json = await res.json()
      setData(json)
    })()
  }, [])
  return (
    <div className="flex flex-col gap-6">
      <h1 className="text-3xl font-bold">Route Handler Usage</h1>
      <p>
        This page fetches data from an API{" "}
        <CustomLink href="https://nextjs.org/docs/app/building-your-application/routing/route-handlers">
          Route Handler
        </CustomLink>
        . The API is protected using the universal{" "}
        <CustomLink href="https://nextjs.authjs.dev#auth">
          <code>auth()</code>
        </CustomLink>{" "}
        method.
      </p>
      <div className="flex flex-col rounded-md bg-gray-100">
        <div className="rounded-t-md bg-gray-200 p-4 font-bold">
          Data from API Route
        </div>
        <pre className="whitespace-pre-wrap break-all px-4 py-6">
          {JSON.stringify(data, null, 2)}
        </pre>
      </div>
    </div>
  )
}


================================================
FILE: apps/examples/nextjs/app/auth/[...nextauth]/route.ts
================================================
import { handlers } from "auth"
export const { GET, POST } = handlers


================================================
FILE: apps/examples/nextjs/app/client-example/page.tsx
================================================
import { auth } from "auth"
import ClientExample from "@/components/client-example"
import { SessionProvider } from "next-auth/react"

export default async function ClientPage() {
  const session = await auth()
  if (session?.user) {
    // TODO: Look into https://react.dev/reference/react/experimental_taintObjectReference
    // filter out sensitive data before passing to client.
    session.user = {
      name: session.user.name,
      email: session.user.email,
      image: session.user.image,
    }
  }

  return (
    <SessionProvider basePath={"/auth"} session={session}>
      <ClientExample />
    </SessionProvider>
  )
}


================================================
FILE: apps/examples/nextjs/app/globals.css
================================================
@tailwind base;
@tailwind components;
@tailwind utilities;

@layer base {
  :root {
    --background: 0 0% 100%;
    --foreground: 222.2 84% 4.9%;

    --card: 0 0% 100%;
    --card-foreground: 222.2 84% 4.9%;

    --popover: 0 0% 100%;
    --popover-foreground: 222.2 84% 4.9%;

    --primary: 222.2 47.4% 11.2%;
    --primary-foreground: 210 40% 98%;

    --secondary: 210 40% 96.1%;
    --secondary-foreground: 222.2 47.4% 11.2%;

    --muted: 210 40% 96.1%;
    --muted-foreground: 215.4 16.3% 46.9%;

    --accent: 210 40% 96.1%;
    --accent-foreground: 222.2 47.4% 11.2%;

    --destructive: 0 84.2% 60.2%;
    --destructive-foreground: 210 40% 98%;

    --border: 214.3 31.8% 91.4%;
    --input: 214.3 31.8% 91.4%;
    --ring: 222.2 84% 4.9%;

    --radius: 0.5rem;
  }
}

@layer base {
  * {
    @apply border-border;
  }

  body {
    @apply bg-background text-foreground;
  }
}


================================================
FILE: apps/examples/nextjs/app/layout.tsx
================================================
import "./globals.css"
import type { Metadata } from "next"
import { Inter } from "next/font/google"
import Footer from "@/components/footer"
import Header from "@/components/header"

const inter = Inter({ subsets: ["latin"] })

export const metadata: Metadata = {
  title: "NextAuth.js Example",
  description:
    "This is an example site to demonstrate how to use NextAuth.js for authentication",
}

export default function RootLayout({ children }: React.PropsWithChildren) {
  return (
    <html lang="en">
      <body className={inter.className}>
        <div className="flex h-full min-h-screen w-full flex-col justify-between">
          <Header />
          <main className="mx-auto w-full max-w-3xl flex-auto px-4 py-4 sm:px-6 md:py-6">
            {children}
          </main>
          <Footer />
        </div>
      </body>
    </html>
  )
}


================================================
FILE: apps/examples/nextjs/app/middleware-example/page.tsx
================================================
import CustomLink from "@/components/custom-link"

export default function Page() {
  return (
    <div className="space-y-2">
      <h1 className="text-3xl font-bold">Middleware usage</h1>
      <p>
        This page is protected by using the universal{" "}
        <CustomLink href="https://nextjs.authjs.dev#auth">
          <code>auth()</code>
        </CustomLink>{" "}
        method in{" "}
        <CustomLink href="https://nextjs.org/docs/app/building-your-application/routing/middleware">
          Next.js Middleware
        </CustomLink>
        .
      </p>
    </div>
  )
}


================================================
FILE: apps/examples/nextjs/app/page.tsx
================================================
import CustomLink from "@/components/custom-link"
import { auth } from "auth"

export default async function Index() {
  const session = await auth()

  return (
    <div className="flex flex-col gap-6">
      <h1 className="text-3xl font-bold">NextAuth.js Example</h1>
      <div>
        This is an example site to demonstrate how to use{" "}
        <CustomLink href="https://nextjs.authjs.dev">NextAuth.js</CustomLink>{" "}
        for authentication. Check out the{" "}
        <CustomLink href="/server-example" className="underline">
          Server
        </CustomLink>{" "}
        and the{" "}
        <CustomLink href="/client-example" className="underline">
          Client
        </CustomLink>{" "}
        examples to see how to secure pages and get session data.
      </div>
      <div>
        WebAuthn users are reset on every deploy, don't expect your test user(s)
        to still be available after a few days. It is designed to only
        demonstrate registration, login, and logout briefly.
      </div>
      <div className="flex flex-col rounded-md bg-gray-100">
        <div className="rounded-t-md bg-gray-200 p-4 font-bold">
          Current Session
        </div>
        <pre className="whitespace-pre-wrap break-all px-4 py-6">
          {JSON.stringify(session, null, 2)}
        </pre>
      </div>
    </div>
  )
}


================================================
FILE: apps/examples/nextjs/app/policy/page.tsx
================================================
export default function PolicyPage() {
  return (
    <div className="space-y-2">
      <section>
        <h2 className="text-xl font-bold">Terms of Service</h2>
        <p>
          THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
          EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
          MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
          IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
          CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
          TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
          SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
        </p>
      </section>
      <section>
        <h2 className="text-xl font-bold">Privacy Policy</h2>
        <p>
          This site uses JSON Web Tokens and a Key-Value database for sessions
          and WebAuthn authenticators which resets every 2 hours.
        </p>
        <p>
          Data provided to this site is exclusively used to support signing in
          and is not passed to any third party services, other than via SMTP or
          OAuth for the purposes of authentication. And Vercel KV / Upstash for
          hosting the Key Value store. This data is deleted every 2 hours via
          cron job.
        </p>
      </section>
    </div>
  )
}


================================================
FILE: apps/examples/nextjs/app/server-example/page.tsx
================================================
import CustomLink from "@/components/custom-link"
import SessionData from "@/components/session-data"
import { auth } from "auth"

export default async function Page() {
  const session = await auth()
  return (
    <div className="space-y-2">
      <h1 className="text-3xl font-bold">React Server Component Usage</h1>
      <p>
        This page is server-rendered as a{" "}
        <CustomLink href="https://nextjs.org/docs/app/building-your-application/rendering/server-components">
          React Server Component
        </CustomLink>
        . It gets the session data on the server using{" "}
        <CustomLink href="https://nextjs.authjs.dev#auth">
          <code>auth()</code>
        </CustomLink>{" "}
        method.
      </p>
      <SessionData session={session} />
    </div>
  )
}


================================================
FILE: apps/examples/nextjs/auth.ts
================================================
import NextAuth from "next-auth"
import "next-auth/jwt"

import Apple from "next-auth/providers/apple"
// import Atlassian from "next-auth/providers/atlassian"
import Auth0 from "next-auth/providers/auth0"
import AzureB2C from "next-auth/providers/azure-ad-b2c"
import BankIDNorway from "next-auth/providers/bankid-no"
import BoxyHQSAML from "next-auth/providers/boxyhq-saml"
import Cognito from "next-auth/providers/cognito"
import Coinbase from "next-auth/providers/coinbase"
import Discord from "next-auth/providers/discord"
import Dropbox from "next-auth/providers/dropbox"
import Facebook from "next-auth/providers/facebook"
import GitHub from "next-auth/providers/github"
import GitLab from "next-auth/providers/gitlab"
import Google from "next-auth/providers/google"
import Hubspot from "next-auth/providers/hubspot"
import Keycloak from "next-auth/providers/keycloak"
import LinkedIn from "next-auth/providers/linkedin"
import MicrosoftEntraId from "next-auth/providers/microsoft-entra-id"
import Netlify from "next-auth/providers/netlify"
import Okta from "next-auth/providers/okta"
import Passage from "next-auth/providers/passage"
import Passkey from "next-auth/providers/passkey"
import Pinterest from "next-auth/providers/pinterest"
import Reddit from "next-auth/providers/reddit"
import Slack from "next-auth/providers/slack"
import Salesforce from "next-auth/providers/salesforce"
import Spotify from "next-auth/providers/spotify"
import Twitch from "next-auth/providers/twitch"
import Twitter from "next-auth/providers/twitter"
import Vipps from "next-auth/providers/vipps"
import WorkOS from "next-auth/providers/workos"
import Zoom from "next-auth/providers/zoom"
import { createStorage } from "unstorage"
import memoryDriver from "unstorage/drivers/memory"
import vercelKVDriver from "unstorage/drivers/vercel-kv"
import { UnstorageAdapter } from "@auth/unstorage-adapter"

const storage = createStorage({
  driver: process.env.VERCEL
    ? vercelKVDriver({
        url: process.env.AUTH_KV_REST_API_URL,
        token: process.env.AUTH_KV_REST_API_TOKEN,
        env: false,
      })
    : memoryDriver(),
})

export const { handlers, auth, signIn, signOut } = NextAuth({
  debug: !!process.env.AUTH_DEBUG,
  theme: { logo: "https://authjs.dev/img/logo-sm.png" },
  adapter: UnstorageAdapter(storage),
  providers: [
    Apple,
    // Atlassian,
    Auth0,
    AzureB2C,
    BankIDNorway,
    BoxyHQSAML({
      clientId: "dummy",
      clientSecret: "dummy",
      issuer: process.env.AUTH_BOXYHQ_SAML_ISSUER,
    }),
    Cognito,
    Coinbase,
    Discord,
    Dropbox,
    Facebook,
    GitHub,
    GitLab,
    Google,
    Hubspot,
    Keycloak({ name: "Keycloak (bob/bob)" }),
    LinkedIn,
    MicrosoftEntraId,
    Netlify,
    Okta,
    Passkey({
      formFields: {
        email: {
          label: "Username",
          required: true,
          autocomplete: "username webauthn",
        },
      },
    }),
    Passage,
    Pinterest,
    Reddit,
    Salesforce,
    Slack,
    Spotify,
    Twitch,
    Twitter,
    Vipps({
      issuer: "https://apitest.vipps.no/access-management-1.0/access/",
    }),
    WorkOS({ connection: process.env.AUTH_WORKOS_CONNECTION! }),
    Zoom,
  ],
  basePath: "/auth",
  session: { strategy: "jwt" },
  callbacks: {
    authorized({ request, auth }) {
      const { pathname } = request.nextUrl
      if (pathname === "/middleware-example") return !!auth
      return true
    },
    jwt({ token, trigger, session, account }) {
      if (trigger === "update") token.name = session.user.name
      if (account?.provider === "keycloak") {
        return { ...token, accessToken: account.access_token }
      }
      return token
    },
    async session({ session, token }) {
      if (token?.accessToken) session.accessToken = token.accessToken

      return session
    },
  },
  experimental: { enableWebAuthn: true },
})

declare module "next-auth" {
  interface Session {
    accessToken?: string
  }
}

declare module "next-auth/jwt" {
  interface JWT {
    accessToken?: string
  }
}


================================================
FILE: apps/examples/nextjs/components/auth-components.tsx
================================================
import { signIn, signOut } from "auth"
import { Button } from "./ui/button"

export function SignIn({
  provider,
  ...props
}: { provider?: string } & React.ComponentPropsWithRef<typeof Button>) {
  return (
    <form
      action={async () => {
        "use server"
        await signIn(provider)
      }}
    >
      <Button {...props}>Sign In</Button>
    </form>
  )
}

export function SignOut(props: React.ComponentPropsWithRef<typeof Button>) {
  return (
    <form
      action={async () => {
        "use server"
        await signOut()
      }}
      className="w-full"
    >
      <Button variant="ghost" className="w-full p-0" {...props}>
        Sign Out
      </Button>
    </form>
  )
}


================================================
FILE: apps/examples/nextjs/components/client-example.tsx
================================================
"use client"

import { useSession } from "next-auth/react"
import { Button } from "./ui/button"
import { Input } from "./ui/input"
import { useState } from "react"
import SessionData from "./session-data"
import CustomLink from "./custom-link"

const UpdateForm = () => {
  const { data: session, update } = useSession()
  const [name, setName] = useState(`New ${session?.user?.name}`)

  if (!session?.user) return null
  return (
    <>
      <h2 className="text-xl font-bold">Updating the session client-side</h2>
      <div className="flex w-full max-w-sm items-center space-x-2">
        <Input
          type="text"
          placeholder="New name"
          value={name}
          onChange={(e) => {
            setName(e.target.value)
          }}
        />
        <Button onClick={() => update({ user: { name } })} type="submit">
          Update
        </Button>
      </div>
    </>
  )
}

export default function ClientExample() {
  const { data: session, status } = useSession()
  const [apiResponse, setApiResponse] = useState("")

  const makeRequestWithToken = async () => {
    try {
      const response = await fetch("/api/authenticated/greeting")
      const data = await response.json()
      setApiResponse(JSON.stringify(data, null, 2))
    } catch (error) {
      setApiResponse("Failed to fetch data: " + error)
    }
  }

  return (
    <div className="flex flex-col gap-4">
      <h1 className="text-3xl font-bold">Client Side Rendering</h1>
      <p>
        This page fetches session data client side using the{" "}
        <CustomLink href="https://nextjs.authjs.dev/react#usesession">
          <code>useSession</code>
        </CustomLink>{" "}
        React Hook.
      </p>
      <p>
        It needs the{" "}
        <CustomLink href="https://react.dev/reference/rsc/use-client">
          <code>'use client'</code>
        </CustomLink>{" "}
        directive at the top of the file to enable client side rendering, and
        the{" "}
        <CustomLink href="https://nextjs.authjs.dev/react#sessionprovider">
          <code>SessionProvider</code>
        </CustomLink>{" "}
        component in{" "}
        <strong>
          <code>client-example/page.tsx</code>
        </strong>{" "}
        to provide the session data.
      </p>

      <div className="flex flex-col gap-4 rounded-md bg-gray-100 p-4">
        <h2 className="text-xl font-bold">Third-party backend integration</h2>
        <p>
          Press the button to send a request to our{" "}
          <CustomLink href="https://github.com/nextauthjs/authjs-third-party-backend">
            <code>example backend</code>
          </CustomLink>
          . Read more{" "}
          <CustomLink href="https://authjs.dev/guides/integrating-third-party-backends">
            <code>here</code>
          </CustomLink>
        </p>
        <div className="flex flex-col">
          <Button
            disabled={!session?.accessToken}
            onClick={makeRequestWithToken}
          >
            Make API Request
          </Button>
        </div>
        <pre>{apiResponse}</pre>
        <p className="italic">
          Note: This example only works when using the Keycloak provider.
        </p>
      </div>

      {status === "loading" ? (
        <div>Loading...</div>
      ) : (
        <SessionData session={session} />
      )}
      <UpdateForm />
    </div>
  )
}


================================================
FILE: apps/examples/nextjs/components/custom-link.tsx
================================================
import { cn } from "@/lib/utils"
import { ExternalLink } from "lucide-react"
import Link from "next/link"

interface CustomLinkProps extends React.LinkHTMLAttributes<HTMLAnchorElement> {
  href: string
}

const CustomLink = ({
  href,
  children,
  className,
  ...rest
}: CustomLinkProps) => {
  const isInternalLink = href.startsWith("/")
  const isAnchorLink = href.startsWith("#")

  if (isInternalLink || isAnchorLink) {
    return (
      <Link href={href} className={className} {...rest}>
        {children}
      </Link>
    )
  }

  return (
    <Link
      href={href}
      target="_blank"
      rel="noopener noreferrer"
      className={cn(
        "inline-flex items-center gap-1 align-baseline underline underline-offset-4",
        className
      )}
      {...rest}
    >
      <span>{children}</span>
      <ExternalLink className="ml-0.5 inline-block h-4 w-4" 
Download .txt
gitextract_vbasb9xy/

├── .dockerignore
├── .github/
│   ├── CODEOWNERS
│   ├── DISCUSSION_TEMPLATE/
│   │   ├── ideas.yml
│   │   └── questions.yml
│   ├── ISSUE_TEMPLATE/
│   │   ├── 1_bug_framework.yml
│   │   ├── 2_bug_provider.yml
│   │   ├── 3_bug_adapter.yml
│   │   ├── 4_documentation.yml
│   │   └── config.yml
│   ├── PULL_REQUEST_TEMPLATE.md
│   ├── broken-link-checker/
│   │   ├── action.yml
│   │   ├── index.d.ts
│   │   ├── package.json
│   │   ├── src/
│   │   │   └── index.ts
│   │   └── tsconfig.json
│   ├── dependabot.yml
│   ├── good-first-issue.md
│   ├── help-needed.md
│   ├── invalid-reproduction.md
│   ├── pr-labeler.yml
│   ├── stale.yml
│   ├── sync.yml
│   ├── version-pr/
│   │   ├── action.yml
│   │   └── index.js
│   └── workflows/
│       ├── broken-link-checker.yml
│       ├── codeql-analysis.yml
│       ├── pr-labeler.yml
│       ├── release.yml
│       ├── sync-examples.yml
│       └── triage.yml
├── .gitignore
├── .nvmrc
├── .prettierignore
├── .vscode/
│   ├── extensions.json
│   ├── settings.json
│   └── snippets.code-snippets
├── LICENSE
├── README.md
├── apps/
│   ├── dev/
│   │   ├── express/
│   │   │   ├── .gitignore
│   │   │   ├── .prettierignore
│   │   │   ├── README.md
│   │   │   ├── api/
│   │   │   │   └── index.js
│   │   │   ├── package.json
│   │   │   ├── public/
│   │   │   │   └── css/
│   │   │   │       └── style.css
│   │   │   ├── src/
│   │   │   │   ├── app.ts
│   │   │   │   ├── config/
│   │   │   │   │   └── auth.config.ts
│   │   │   │   ├── errors.ts
│   │   │   │   ├── middleware/
│   │   │   │   │   ├── auth.middleware.ts
│   │   │   │   │   └── error.middleware.ts
│   │   │   │   └── server.ts
│   │   │   ├── tsconfig.json
│   │   │   └── views/
│   │   │       ├── error.pug
│   │   │       ├── index.pug
│   │   │       ├── layout.pug
│   │   │       └── protected.pug
│   │   ├── nextjs/
│   │   │   ├── .gitignore
│   │   │   ├── .vscode/
│   │   │   │   └── settings.json
│   │   │   ├── README.md
│   │   │   ├── app/
│   │   │   │   ├── api/
│   │   │   │   │   └── protected/
│   │   │   │   │       └── route.ts
│   │   │   │   ├── auth/
│   │   │   │   │   └── [...nextauth]/
│   │   │   │   │       └── route.ts
│   │   │   │   ├── client.tsx
│   │   │   │   ├── dashboard/
│   │   │   │   │   └── page.tsx
│   │   │   │   ├── layout.tsx
│   │   │   │   ├── page.tsx
│   │   │   │   └── styles.css
│   │   │   ├── auth.ts
│   │   │   ├── components/
│   │   │   │   ├── access-denied.tsx
│   │   │   │   ├── footer.module.css
│   │   │   │   ├── footer.tsx
│   │   │   │   ├── header.module.css
│   │   │   │   └── header.tsx
│   │   │   ├── middleware.ts
│   │   │   ├── next-env.d.ts
│   │   │   ├── next.config.js
│   │   │   ├── package.json
│   │   │   ├── pages/
│   │   │   │   ├── _app.tsx
│   │   │   │   ├── api/
│   │   │   │   │   └── examples/
│   │   │   │   │       ├── protected.ts
│   │   │   │   │       └── session.ts
│   │   │   │   ├── client.tsx
│   │   │   │   ├── credentials.tsx
│   │   │   │   ├── email.tsx
│   │   │   │   ├── policy.tsx
│   │   │   │   ├── protected-ssr.tsx
│   │   │   │   ├── protected.tsx
│   │   │   │   └── styles.css
│   │   │   ├── prisma/
│   │   │   │   ├── migrations/
│   │   │   │   │   ├── 20231023165117_/
│   │   │   │   │   │   └── migration.sql
│   │   │   │   │   ├── 20240124035029_init/
│   │   │   │   │   │   └── migration.sql
│   │   │   │   │   └── migration_lock.toml
│   │   │   │   └── schema.prisma
│   │   │   ├── tests/
│   │   │   │   └── signin.spec.ts
│   │   │   └── tsconfig.json
│   │   ├── qwik/
│   │   │   ├── .gitignore
│   │   │   ├── README.md
│   │   │   ├── package.json
│   │   │   ├── public/
│   │   │   │   ├── manifest.json
│   │   │   │   └── robots.txt
│   │   │   ├── qwik.env.d.ts
│   │   │   ├── src/
│   │   │   │   ├── components/
│   │   │   │   │   └── router-head/
│   │   │   │   │       └── router-head.tsx
│   │   │   │   ├── entry.dev.tsx
│   │   │   │   ├── entry.preview.tsx
│   │   │   │   ├── entry.ssr.tsx
│   │   │   │   ├── global.css
│   │   │   │   ├── root.tsx
│   │   │   │   └── routes/
│   │   │   │       ├── index.tsx
│   │   │   │       ├── layout.tsx
│   │   │   │       ├── plugin@auth.ts
│   │   │   │       └── service-worker.ts
│   │   │   ├── tsconfig.json
│   │   │   └── vite.config.ts
│   │   └── sveltekit/
│   │       ├── .env.example
│   │       ├── .eslintignore
│   │       ├── .eslintrc.cjs
│   │       ├── .gitignore
│   │       ├── .prettierignore
│   │       ├── .prettierrc
│   │       ├── README.md
│   │       ├── package.json
│   │       ├── src/
│   │       │   ├── app.d.ts
│   │       │   ├── app.html
│   │       │   ├── auth.ts
│   │       │   ├── components/
│   │       │   │   └── header.svelte
│   │       │   ├── hooks.server.ts
│   │       │   ├── routes/
│   │       │   │   ├── +layout.server.ts
│   │       │   │   ├── +layout.svelte
│   │       │   │   ├── +page.svelte
│   │       │   │   ├── protected/
│   │       │   │   │   └── +page.svelte
│   │       │   │   ├── signin/
│   │       │   │   │   └── +page.server.ts
│   │       │   │   └── signout/
│   │       │   │       └── +page.server.ts
│   │       │   └── style.css
│   │       ├── svelte.config.js
│   │       ├── tsconfig.json
│   │       └── vite.config.js
│   ├── examples/
│   │   ├── express/
│   │   │   ├── .eslintrc.cjs
│   │   │   ├── .gitignore
│   │   │   ├── .prettierignore
│   │   │   ├── .prettierrc
│   │   │   ├── README.md
│   │   │   ├── api/
│   │   │   │   └── index.js
│   │   │   ├── package.json
│   │   │   ├── public/
│   │   │   │   └── css/
│   │   │   │       └── style.css
│   │   │   ├── src/
│   │   │   │   ├── app.ts
│   │   │   │   ├── config/
│   │   │   │   │   └── auth.config.ts
│   │   │   │   ├── errors.ts
│   │   │   │   ├── middleware/
│   │   │   │   │   ├── auth.middleware.ts
│   │   │   │   │   └── error.middleware.ts
│   │   │   │   └── server.ts
│   │   │   ├── tailwind.config.js
│   │   │   ├── tsconfig.json
│   │   │   ├── types/
│   │   │   │   └── express/
│   │   │   │       └── index.d.ts
│   │   │   ├── vercel.json
│   │   │   └── views/
│   │   │       ├── error.pug
│   │   │       ├── index.pug
│   │   │       ├── layout.pug
│   │   │       └── protected.pug
│   │   ├── nextjs/
│   │   │   ├── .gitignore
│   │   │   ├── Dockerfile
│   │   │   ├── README.md
│   │   │   ├── app/
│   │   │   │   ├── [...proxy]/
│   │   │   │   │   └── route.tsx
│   │   │   │   ├── api/
│   │   │   │   │   └── protected/
│   │   │   │   │       └── route.ts
│   │   │   │   ├── api-example/
│   │   │   │   │   └── page.tsx
│   │   │   │   ├── auth/
│   │   │   │   │   └── [...nextauth]/
│   │   │   │   │       └── route.ts
│   │   │   │   ├── client-example/
│   │   │   │   │   └── page.tsx
│   │   │   │   ├── globals.css
│   │   │   │   ├── layout.tsx
│   │   │   │   ├── middleware-example/
│   │   │   │   │   └── page.tsx
│   │   │   │   ├── page.tsx
│   │   │   │   ├── policy/
│   │   │   │   │   └── page.tsx
│   │   │   │   └── server-example/
│   │   │   │       └── page.tsx
│   │   │   ├── auth.ts
│   │   │   ├── components/
│   │   │   │   ├── auth-components.tsx
│   │   │   │   ├── client-example.tsx
│   │   │   │   ├── custom-link.tsx
│   │   │   │   ├── footer.tsx
│   │   │   │   ├── header.tsx
│   │   │   │   ├── main-nav.tsx
│   │   │   │   ├── session-data.tsx
│   │   │   │   ├── ui/
│   │   │   │   │   ├── avatar.tsx
│   │   │   │   │   ├── button.tsx
│   │   │   │   │   ├── dropdown-menu.tsx
│   │   │   │   │   ├── input.tsx
│   │   │   │   │   └── navigation-menu.tsx
│   │   │   │   └── user-button.tsx
│   │   │   ├── components.json
│   │   │   ├── docker-compose.yml
│   │   │   ├── lib/
│   │   │   │   └── utils.ts
│   │   │   ├── middleware.ts
│   │   │   ├── next.config.js
│   │   │   ├── package.json
│   │   │   ├── postcss.config.js
│   │   │   ├── tailwind.config.js
│   │   │   ├── test-docker.sh
│   │   │   └── tsconfig.json
│   │   ├── nextjs-pages/
│   │   │   ├── .gitignore
│   │   │   ├── README.md
│   │   │   ├── app/
│   │   │   │   └── api/
│   │   │   │       └── auth/
│   │   │   │           └── [...nextauth]/
│   │   │   │               └── route.ts
│   │   │   ├── auth.ts
│   │   │   ├── components/
│   │   │   │   ├── auth-components.tsx
│   │   │   │   ├── client-example.tsx
│   │   │   │   ├── custom-link.tsx
│   │   │   │   ├── footer.tsx
│   │   │   │   ├── header.tsx
│   │   │   │   ├── main-nav.tsx
│   │   │   │   ├── session-data.tsx
│   │   │   │   ├── ui/
│   │   │   │   │   ├── avatar.tsx
│   │   │   │   │   ├── button.tsx
│   │   │   │   │   ├── dropdown-menu.tsx
│   │   │   │   │   ├── input.tsx
│   │   │   │   │   └── navigation-menu.tsx
│   │   │   │   └── user-button.tsx
│   │   │   ├── components.json
│   │   │   ├── lib/
│   │   │   │   └── utils.ts
│   │   │   ├── middleware.ts
│   │   │   ├── next.config.js
│   │   │   ├── package.json
│   │   │   ├── pages/
│   │   │   │   ├── _app.tsx
│   │   │   │   ├── api/
│   │   │   │   │   └── protected.ts
│   │   │   │   ├── api-example/
│   │   │   │   │   └── index.tsx
│   │   │   │   ├── client-example/
│   │   │   │   │   └── index.tsx
│   │   │   │   ├── globals.css
│   │   │   │   ├── index.tsx
│   │   │   │   ├── middleware-example/
│   │   │   │   │   └── index.tsx
│   │   │   │   ├── policy/
│   │   │   │   │   └── index.tsx
│   │   │   │   └── server-example/
│   │   │   │       └── index.tsx
│   │   │   ├── postcss.config.js
│   │   │   ├── tailwind.config.js
│   │   │   └── tsconfig.json
│   │   ├── qwik/
│   │   │   ├── .eslintignore
│   │   │   ├── .eslintrc.cjs
│   │   │   ├── .gitignore
│   │   │   ├── .prettierignore
│   │   │   ├── .prettierrc.js
│   │   │   ├── .vscode/
│   │   │   │   ├── launch.json
│   │   │   │   ├── qwik-city.code-snippets
│   │   │   │   └── qwik.code-snippets
│   │   │   ├── README.md
│   │   │   ├── adapters/
│   │   │   │   └── vercel-edge/
│   │   │   │       └── vite.config.ts
│   │   │   ├── package.json
│   │   │   ├── postcss.config.cjs
│   │   │   ├── public/
│   │   │   │   ├── manifest.json
│   │   │   │   └── robots.txt
│   │   │   ├── qwik.env.d.ts
│   │   │   ├── src/
│   │   │   │   ├── components/
│   │   │   │   │   ├── avatar/
│   │   │   │   │   │   └── avatar.tsx
│   │   │   │   │   ├── header/
│   │   │   │   │   │   └── header.tsx
│   │   │   │   │   ├── icones/
│   │   │   │   │   │   └── qwik.tsx
│   │   │   │   │   └── router-head/
│   │   │   │   │       └── router-head.tsx
│   │   │   │   ├── entry.dev.tsx
│   │   │   │   ├── entry.preview.tsx
│   │   │   │   ├── entry.ssr.tsx
│   │   │   │   ├── entry.vercel-edge.tsx
│   │   │   │   ├── global.css
│   │   │   │   ├── root.tsx
│   │   │   │   └── routes/
│   │   │   │       ├── index.tsx
│   │   │   │       ├── layout.tsx
│   │   │   │       ├── plugin@auth.ts
│   │   │   │       ├── protected/
│   │   │   │       │   └── index.tsx
│   │   │   │       └── service-worker.ts
│   │   │   ├── tailwind.config.js
│   │   │   ├── tsconfig.json
│   │   │   ├── vercel.json
│   │   │   └── vite.config.ts
│   │   ├── solid-start/
│   │   │   ├── .gitignore
│   │   │   ├── README.md
│   │   │   ├── package.json
│   │   │   ├── postcss.config.cjs
│   │   │   ├── src/
│   │   │   │   ├── components/
│   │   │   │   │   ├── NavBar/
│   │   │   │   │   │   ├── NavBar.tsx
│   │   │   │   │   │   └── index.ts
│   │   │   │   │   ├── Protected/
│   │   │   │   │   │   ├── Protected.tsx
│   │   │   │   │   │   └── index.ts
│   │   │   │   │   └── index.ts
│   │   │   │   ├── entry-client.tsx
│   │   │   │   ├── entry-server.tsx
│   │   │   │   ├── env/
│   │   │   │   │   ├── client.ts
│   │   │   │   │   ├── schema.ts
│   │   │   │   │   └── server.ts
│   │   │   │   ├── root.css
│   │   │   │   ├── root.tsx
│   │   │   │   └── routes/
│   │   │   │       ├── api/
│   │   │   │       │   └── auth/
│   │   │   │       │       └── [...solidauth].ts
│   │   │   │       ├── index.tsx
│   │   │   │       └── protected.tsx
│   │   │   ├── tailwind.config.cjs
│   │   │   ├── tsconfig.json
│   │   │   └── vite.config.ts
│   │   └── sveltekit/
│   │       ├── .env.example
│   │       ├── .eslintignore
│   │       ├── .eslintrc.cjs
│   │       ├── .gitignore
│   │       ├── .prettierignore
│   │       ├── .prettierrc
│   │       ├── README.md
│   │       ├── package.json
│   │       ├── src/
│   │       │   ├── app.d.ts
│   │       │   ├── app.html
│   │       │   ├── auth.ts
│   │       │   ├── components/
│   │       │   │   ├── external-icon.svelte
│   │       │   │   ├── footer.svelte
│   │       │   │   └── header.svelte
│   │       │   ├── hooks.server.ts
│   │       │   └── routes/
│   │       │       ├── +layout.server.ts
│   │       │       ├── +layout.svelte
│   │       │       ├── +page.svelte
│   │       │       ├── protected/
│   │       │       │   └── +page.svelte
│   │       │       ├── signin/
│   │       │       │   └── +page.server.ts
│   │       │       └── signout/
│   │       │           └── +page.server.ts
│   │       ├── svelte.config.js
│   │       ├── tsconfig.json
│   │       └── vite.config.js
│   ├── playgrounds/
│   │   └── README.md
│   └── proxy/
│       ├── .gitignore
│       ├── README.md
│       ├── api/
│       │   ├── [auth].ts
│       │   └── callback/
│       │       └── [auth].ts
│       ├── package.json
│       └── tsconfig.json
├── docs/
│   ├── .gitignore
│   ├── .vscode/
│   │   └── settings.json
│   ├── LICENSE
│   ├── README.md
│   ├── app/
│   │   └── api/
│   │       ├── cron/
│   │       │   └── route.ts
│   │       └── og/
│   │           └── route.tsx
│   ├── components/
│   │   ├── Accordion/
│   │   │   └── index.tsx
│   │   ├── Blur/
│   │   │   └── index.tsx
│   │   ├── Code/
│   │   │   └── index.tsx
│   │   ├── DocSearch/
│   │   │   ├── index.tsx
│   │   │   └── wrapper.tsx
│   │   ├── Footer/
│   │   │   └── index.tsx
│   │   ├── FrameworkLink/
│   │   │   └── index.tsx
│   │   ├── Guides/
│   │   │   └── index.tsx
│   │   ├── Icons/
│   │   │   ├── ArrowRight.tsx
│   │   │   ├── ArrowSquareOut.tsx
│   │   │   ├── Browser.tsx
│   │   │   ├── CaretRight.tsx
│   │   │   ├── ChatCircleText.tsx
│   │   │   ├── Check.tsx
│   │   │   ├── Flask.tsx
│   │   │   ├── GitBranch.tsx
│   │   │   ├── GithubLogo.tsx
│   │   │   ├── Link.tsx
│   │   │   ├── Plus.tsx
│   │   │   ├── SealWarning.tsx
│   │   │   ├── ShieldStar.tsx
│   │   │   ├── Sparkle.tsx
│   │   │   └── index.tsx
│   │   ├── InkeepSearch/
│   │   │   └── index.tsx
│   │   ├── Link/
│   │   │   └── index.tsx
│   │   ├── ListDisclosure/
│   │   │   ├── index.tsx
│   │   │   └── useListDisclosure.ts
│   │   ├── LogosMarquee/
│   │   │   ├── index.tsx
│   │   │   └── logo.tsx
│   │   ├── OAuthProviderInstructions/
│   │   │   ├── OAuthProviderSelect.tsx
│   │   │   ├── content/
│   │   │   │   ├── components/
│   │   │   │   │   ├── SetupCode.tsx
│   │   │   │   │   ├── SignInCode.tsx
│   │   │   │   │   ├── StepTitle.tsx
│   │   │   │   │   └── TSIcon.tsx
│   │   │   │   └── index.tsx
│   │   │   └── index.tsx
│   │   ├── RichTabs/
│   │   │   ├── index.tsx
│   │   │   └── useRichTabs.ts
│   │   ├── Screenshot/
│   │   │   └── index.tsx
│   │   └── SearchBarProviders/
│   │       └── PreviewProviders.tsx
│   ├── hooks/
│   │   └── use-select-combobox.ts
│   ├── next-env.d.ts
│   ├── next-sitemap.config.cjs
│   ├── next.config.js
│   ├── package.json
│   ├── pages/
│   │   ├── 404.mdx
│   │   ├── _app.tsx
│   │   ├── _document.tsx
│   │   ├── _meta.js
│   │   ├── animated-stars.css
│   │   ├── concepts/
│   │   │   ├── _meta.js
│   │   │   ├── database-models.mdx
│   │   │   ├── index.mdx
│   │   │   ├── oauth.mdx
│   │   │   └── session-strategies.mdx
│   │   ├── contributors.mdx
│   │   ├── data/
│   │   │   └── manifest.json
│   │   ├── getting-started/
│   │   │   ├── _meta.js
│   │   │   ├── adapters/
│   │   │   │   ├── _meta.js
│   │   │   │   ├── azure-tables.mdx
│   │   │   │   ├── d1.mdx
│   │   │   │   ├── dgraph.mdx
│   │   │   │   ├── drizzle.mdx
│   │   │   │   ├── dynamodb.mdx
│   │   │   │   ├── edgedb.mdx
│   │   │   │   ├── fauna.mdx
│   │   │   │   ├── firebase.mdx
│   │   │   │   ├── hasura.mdx
│   │   │   │   ├── kysely.mdx
│   │   │   │   ├── mikro-orm.mdx
│   │   │   │   ├── mongodb.mdx
│   │   │   │   ├── neo4j.mdx
│   │   │   │   ├── neon.mdx
│   │   │   │   ├── pg.mdx
│   │   │   │   ├── pouchdb.mdx
│   │   │   │   ├── prisma.mdx
│   │   │   │   ├── sequelize.mdx
│   │   │   │   ├── supabase.mdx
│   │   │   │   ├── surrealdb.mdx
│   │   │   │   ├── typeorm.mdx
│   │   │   │   ├── unstorage.mdx
│   │   │   │   ├── upstash-redis.mdx
│   │   │   │   └── xata.mdx
│   │   │   ├── authentication/
│   │   │   │   ├── _meta.js
│   │   │   │   ├── credentials.mdx
│   │   │   │   ├── email.mdx
│   │   │   │   ├── oauth.mdx
│   │   │   │   └── webauthn.mdx
│   │   │   ├── authentication.mdx
│   │   │   ├── database.mdx
│   │   │   ├── deployment.mdx
│   │   │   ├── index.mdx
│   │   │   ├── installation.mdx
│   │   │   ├── integrations.mdx
│   │   │   ├── migrate-to-better-auth.mdx
│   │   │   ├── migrating-to-v5.mdx
│   │   │   ├── providers/
│   │   │   │   ├── 42-school.mdx
│   │   │   │   ├── apple.mdx
│   │   │   │   ├── asgardeo.mdx
│   │   │   │   ├── auth0.mdx
│   │   │   │   ├── authentik.mdx
│   │   │   │   ├── azure-ad-b2c.mdx
│   │   │   │   ├── azure-ad.mdx
│   │   │   │   ├── azure-devops.mdx
│   │   │   │   ├── bankid-no.mdx
│   │   │   │   ├── battlenet.mdx
│   │   │   │   ├── beyondidentity.mdx
│   │   │   │   ├── bitbucket.mdx
│   │   │   │   ├── box.mdx
│   │   │   │   ├── boxyhq-saml.mdx
│   │   │   │   ├── bungie.mdx
│   │   │   │   ├── click-up.mdx
│   │   │   │   ├── cognito.mdx
│   │   │   │   ├── coinbase.mdx
│   │   │   │   ├── credentials.mdx
│   │   │   │   ├── descope.mdx
│   │   │   │   ├── discord.mdx
│   │   │   │   ├── dribbble.mdx
│   │   │   │   ├── dropbox.mdx
│   │   │   │   ├── duende-identity-server6.mdx
│   │   │   │   ├── eveonline.mdx
│   │   │   │   ├── facebook.mdx
│   │   │   │   ├── faceit.mdx
│   │   │   │   ├── figma.mdx
│   │   │   │   ├── forwardemail.mdx
│   │   │   │   ├── foursquare.mdx
│   │   │   │   ├── freshbooks.mdx
│   │   │   │   ├── frontegg.mdx
│   │   │   │   ├── fusionauth.mdx
│   │   │   │   ├── github.mdx
│   │   │   │   ├── gitlab.mdx
│   │   │   │   ├── google.mdx
│   │   │   │   ├── hubspot.mdx
│   │   │   │   ├── identity-server4.mdx
│   │   │   │   ├── instagram.mdx
│   │   │   │   ├── kakao.mdx
│   │   │   │   ├── keycloak.mdx
│   │   │   │   ├── line.mdx
│   │   │   │   ├── linkedin.mdx
│   │   │   │   ├── logto.mdx
│   │   │   │   ├── loops.mdx
│   │   │   │   ├── mailchimp.mdx
│   │   │   │   ├── mailgun.mdx
│   │   │   │   ├── mailru.mdx
│   │   │   │   ├── mastodon.mdx
│   │   │   │   ├── mattermost.mdx
│   │   │   │   ├── medium.mdx
│   │   │   │   ├── microsoft-entra-id.mdx
│   │   │   │   ├── naver.mdx
│   │   │   │   ├── netlify.mdx
│   │   │   │   ├── netsuite.mdx
│   │   │   │   ├── nextcloud.mdx
│   │   │   │   ├── nodemailer.mdx
│   │   │   │   ├── notion.mdx
│   │   │   │   ├── okta.mdx
│   │   │   │   ├── onelogin.mdx
│   │   │   │   ├── osso.mdx
│   │   │   │   ├── osu.mdx
│   │   │   │   ├── passage.mdx
│   │   │   │   ├── passkey.mdx
│   │   │   │   ├── patreon.mdx
│   │   │   │   ├── pinterest.mdx
│   │   │   │   ├── pipedrive.mdx
│   │   │   │   ├── postmark.mdx
│   │   │   │   ├── reddit.mdx
│   │   │   │   ├── resend.mdx
│   │   │   │   ├── sailpoint.mdx
│   │   │   │   ├── salesforce.mdx
│   │   │   │   ├── sendgrid.mdx
│   │   │   │   ├── simplelogin.mdx
│   │   │   │   ├── slack.mdx
│   │   │   │   ├── spotify.mdx
│   │   │   │   ├── strava.mdx
│   │   │   │   ├── threads.mdx
│   │   │   │   ├── tiktok.mdx
│   │   │   │   ├── todoist.mdx
│   │   │   │   ├── trakt.mdx
│   │   │   │   ├── twitch.mdx
│   │   │   │   ├── twitter.mdx
│   │   │   │   ├── united-effects.mdx
│   │   │   │   ├── vipps-mobilepay.mdx
│   │   │   │   ├── vk.mdx
│   │   │   │   ├── webex.mdx
│   │   │   │   ├── wikimedia.mdx
│   │   │   │   ├── wordpress.mdx
│   │   │   │   ├── workos.mdx
│   │   │   │   ├── yandex.mdx
│   │   │   │   ├── zitadel.mdx
│   │   │   │   ├── zoho.mdx
│   │   │   │   └── zoom.mdx
│   │   │   ├── session-management/
│   │   │   │   ├── _meta.js
│   │   │   │   ├── custom-pages.mdx
│   │   │   │   ├── get-session.mdx
│   │   │   │   ├── login.mdx
│   │   │   │   └── protecting.mdx
│   │   │   └── typescript.mdx
│   │   ├── global.css
│   │   ├── guides/
│   │   │   ├── _meta.js
│   │   │   ├── configuring-github.mdx
│   │   │   ├── configuring-http-email.mdx
│   │   │   ├── configuring-oauth-providers.mdx
│   │   │   ├── configuring-resend.mdx
│   │   │   ├── corporate-proxy.mdx
│   │   │   ├── creating-a-database-adapter.mdx
│   │   │   ├── creating-a-framework-integration.mdx
│   │   │   ├── debugging.mdx
│   │   │   ├── edge-compatibility.mdx
│   │   │   ├── environment-variables.mdx
│   │   │   ├── extending-the-session.mdx
│   │   │   ├── integrating-third-party-backends.mdx
│   │   │   ├── pages/
│   │   │   │   ├── _meta.js
│   │   │   │   ├── built-in-pages.mdx
│   │   │   │   ├── error.mdx
│   │   │   │   ├── signin.mdx
│   │   │   │   └── signout.mdx
│   │   │   ├── refresh-token-rotation.mdx
│   │   │   ├── restricting-user-access.mdx
│   │   │   ├── role-based-access-control.mdx
│   │   │   └── testing.mdx
│   │   ├── index.mdx
│   │   ├── reference/
│   │   │   └── _meta.js
│   │   └── security.mdx
│   ├── postcss.config.cjs
│   ├── public/
│   │   └── .well-known/
│   │       └── security.txt
│   ├── tailwind.config.js
│   ├── theme.config.tsx
│   ├── tsconfig.json
│   ├── typedoc-nextauth.js
│   ├── typedoc.config.cjs
│   ├── types.d.ts
│   ├── utils/
│   │   ├── types.ts
│   │   ├── useCopyButton.ts
│   │   └── useInkeepSettings.ts
│   └── vercel.json
├── eslint.config.mjs
├── lefthook.yml
├── package.json
├── packages/
│   ├── adapter-azure-tables/
│   │   ├── README.md
│   │   ├── package.json
│   │   ├── src/
│   │   │   └── index.ts
│   │   ├── test/
│   │   │   ├── index.test.ts
│   │   │   └── test.sh
│   │   ├── tsconfig.json
│   │   └── typedoc.config.cjs
│   ├── adapter-d1/
│   │   ├── README.md
│   │   ├── package.json
│   │   ├── src/
│   │   │   ├── index.ts
│   │   │   ├── migrations.ts
│   │   │   └── queries.ts
│   │   ├── test/
│   │   │   └── index.test.ts
│   │   ├── tsconfig.json
│   │   └── typedoc.config.cjs
│   ├── adapter-dgraph/
│   │   ├── README.md
│   │   ├── package.json
│   │   ├── src/
│   │   │   ├── index.ts
│   │   │   └── lib/
│   │   │       ├── client.ts
│   │   │       └── graphql/
│   │   │           ├── fragments.ts
│   │   │           └── schema.gql
│   │   ├── test/
│   │   │   ├── index.test.ts
│   │   │   ├── private.key
│   │   │   ├── public.key
│   │   │   └── test.sh
│   │   ├── tsconfig.json
│   │   └── typedoc.config.cjs
│   ├── adapter-drizzle/
│   │   ├── README.md
│   │   ├── package.json
│   │   ├── src/
│   │   │   ├── index.ts
│   │   │   └── lib/
│   │   │       ├── mysql.ts
│   │   │       ├── pg.ts
│   │   │       ├── sqlite.ts
│   │   │       └── utils.ts
│   │   ├── test/
│   │   │   ├── fixtures.ts
│   │   │   ├── mysql/
│   │   │   │   ├── drizzle.config.ts
│   │   │   │   ├── index.test.ts
│   │   │   │   ├── migrator.ts
│   │   │   │   ├── schema.ts
│   │   │   │   └── test.sh
│   │   │   ├── mysql-multi-project-schema/
│   │   │   │   ├── drizzle.config.ts
│   │   │   │   ├── index.test.ts
│   │   │   │   ├── migrator.ts
│   │   │   │   ├── schema.ts
│   │   │   │   └── test.sh
│   │   │   ├── pg/
│   │   │   │   ├── drizzle.config.ts
│   │   │   │   ├── index.test.ts
│   │   │   │   ├── migrator.ts
│   │   │   │   ├── schema.ts
│   │   │   │   └── test.sh
│   │   │   ├── pg-multi-project-schema/
│   │   │   │   ├── drizzle.config.ts
│   │   │   │   ├── index.test.ts
│   │   │   │   ├── migrator.ts
│   │   │   │   ├── schema.ts
│   │   │   │   └── test.sh
│   │   │   ├── sqlite/
│   │   │   │   ├── drizzle.config.ts
│   │   │   │   ├── index.test.ts
│   │   │   │   ├── migrator.ts
│   │   │   │   ├── schema.ts
│   │   │   │   └── test.sh
│   │   │   └── sqlite-multi-project-schema/
│   │   │       ├── drizzle.config.ts
│   │   │       ├── index.test.ts
│   │   │       ├── migrator.ts
│   │   │       ├── schema.ts
│   │   │       └── test.sh
│   │   ├── tsconfig.json
│   │   └── typedoc.config.cjs
│   ├── adapter-dynamodb/
│   │   ├── README.md
│   │   ├── jest-dynamodb-config.cjs
│   │   ├── package.json
│   │   ├── src/
│   │   │   └── index.ts
│   │   ├── test/
│   │   │   ├── format.test.ts
│   │   │   └── index.test.ts
│   │   ├── tsconfig.json
│   │   └── typedoc.config.cjs
│   ├── adapter-edgedb/
│   │   ├── README.md
│   │   ├── package.json
│   │   ├── src/
│   │   │   └── index.ts
│   │   ├── test/
│   │   │   └── index.test.ts
│   │   ├── tsconfig.json
│   │   └── typedoc.config.cjs
│   ├── adapter-fauna/
│   │   ├── .fauna-project
│   │   ├── README.md
│   │   ├── fauna/
│   │   │   ├── account.fsl
│   │   │   ├── session.fsl
│   │   │   ├── user.fsl
│   │   │   └── verificationToken.fsl
│   │   ├── package.json
│   │   ├── src/
│   │   │   └── index.ts
│   │   ├── test/
│   │   │   ├── index.test.ts
│   │   │   └── test.sh
│   │   ├── tsconfig.json
│   │   └── typedoc.config.cjs
│   ├── adapter-firebase/
│   │   ├── README.md
│   │   ├── package.json
│   │   ├── src/
│   │   │   └── index.ts
│   │   ├── test/
│   │   │   ├── firestore.rules
│   │   │   ├── index.test.ts
│   │   │   └── test.sh
│   │   ├── tsconfig.json
│   │   ├── typedoc.config.cjs
│   │   └── vitest.config.ts
│   ├── adapter-hasura/
│   │   ├── README.md
│   │   ├── codegen.ts
│   │   ├── docker-compose.yml
│   │   ├── hasura/
│   │   │   ├── config.yaml
│   │   │   ├── metadata/
│   │   │   │   ├── actions.graphql
│   │   │   │   ├── actions.yaml
│   │   │   │   ├── allow_list.yaml
│   │   │   │   ├── api_limits.yaml
│   │   │   │   ├── cron_triggers.yaml
│   │   │   │   ├── databases/
│   │   │   │   │   ├── databases.yaml
│   │   │   │   │   └── default/
│   │   │   │   │       └── tables/
│   │   │   │   │           ├── public_accounts.yaml
│   │   │   │   │           ├── public_provider_type.yaml
│   │   │   │   │           ├── public_sessions.yaml
│   │   │   │   │           ├── public_users.yaml
│   │   │   │   │           ├── public_verification_tokens.yaml
│   │   │   │   │           └── tables.yaml
│   │   │   │   ├── graphql_schema_introspection.yaml
│   │   │   │   ├── inherited_roles.yaml
│   │   │   │   ├── network.yaml
│   │   │   │   ├── query_collections.yaml
│   │   │   │   ├── remote_schemas.yaml
│   │   │   │   ├── rest_endpoints.yaml
│   │   │   │   └── version.yaml
│   │   │   └── migrations/
│   │   │       └── default/
│   │   │           └── 1666885939998_init_nextauth_models/
│   │   │               └── up.sql
│   │   ├── package.json
│   │   ├── schema.gql
│   │   ├── src/
│   │   │   ├── index.ts
│   │   │   ├── lib/
│   │   │   │   └── client.ts
│   │   │   └── queries/
│   │   │       ├── account.graphql
│   │   │       ├── delete.graphql
│   │   │       ├── fragments.graphql
│   │   │       ├── session.graphql
│   │   │       ├── user.graphql
│   │   │       └── verification-token.graphql
│   │   ├── test/
│   │   │   ├── index.test.ts
│   │   │   └── test.sh
│   │   ├── tsconfig.json
│   │   └── typedoc.config.cjs
│   ├── adapter-kysely/
│   │   ├── README.md
│   │   ├── package.json
│   │   ├── src/
│   │   │   └── index.ts
│   │   ├── test/
│   │   │   ├── index.test.ts
│   │   │   ├── scripts/
│   │   │   │   └── mysql-init.sql
│   │   │   └── test.sh
│   │   ├── tsconfig.json
│   │   └── typedoc.config.cjs
│   ├── adapter-mikro-orm/
│   │   ├── README.md
│   │   ├── package.json
│   │   ├── src/
│   │   │   ├── index.ts
│   │   │   └── lib/
│   │   │       └── entities.ts
│   │   ├── test/
│   │   │   ├── __snapshots__/
│   │   │   │   └── schema.test.ts.snap
│   │   │   ├── entities.test.ts
│   │   │   └── schema.test.ts
│   │   ├── tsconfig.json
│   │   └── typedoc.config.cjs
│   ├── adapter-mongodb/
│   │   ├── README.md
│   │   ├── package.json
│   │   ├── src/
│   │   │   └── index.ts
│   │   ├── test/
│   │   │   ├── custom.test.ts
│   │   │   ├── index.test.ts
│   │   │   ├── serverless.test.ts
│   │   │   └── test.sh
│   │   ├── tsconfig.json
│   │   └── typedoc.config.cjs
│   ├── adapter-neo4j/
│   │   ├── README.md
│   │   ├── package.json
│   │   ├── src/
│   │   │   └── index.ts
│   │   ├── test/
│   │   │   ├── index.test.ts
│   │   │   ├── resources/
│   │   │   │   └── statements.ts
│   │   │   └── test.sh
│   │   ├── tsconfig.json
│   │   └── typedoc.config.cjs
│   ├── adapter-neon/
│   │   ├── README.md
│   │   ├── package.json
│   │   ├── schema.sql
│   │   ├── src/
│   │   │   └── index.ts
│   │   ├── test/
│   │   │   ├── index.test.ts
│   │   │   └── test.sh
│   │   ├── tsconfig.json
│   │   └── typedoc.config.cjs
│   ├── adapter-pg/
│   │   ├── README.md
│   │   ├── package.json
│   │   ├── schema.sql
│   │   ├── src/
│   │   │   └── index.ts
│   │   ├── test/
│   │   │   ├── index.test.ts
│   │   │   └── test.sh
│   │   ├── tsconfig.json
│   │   └── typedoc.config.cjs
│   ├── adapter-pouchdb/
│   │   ├── README.md
│   │   ├── package.json
│   │   ├── src/
│   │   │   └── index.ts
│   │   ├── test/
│   │   │   └── index.test.ts
│   │   ├── tsconfig.json
│   │   └── typedoc.config.cjs
│   ├── adapter-prisma/
│   │   ├── README.md
│   │   ├── package.json
│   │   ├── prisma/
│   │   │   ├── custom.prisma
│   │   │   ├── mongodb.prisma
│   │   │   └── schema.prisma
│   │   ├── src/
│   │   │   └── index.ts
│   │   ├── test/
│   │   │   ├── index.test.ts
│   │   │   └── mongodb.test.sh
│   │   ├── tsconfig.json
│   │   └── typedoc.config.js
│   ├── adapter-sequelize/
│   │   ├── README.md
│   │   ├── package.json
│   │   ├── src/
│   │   │   ├── index.ts
│   │   │   └── models.ts
│   │   ├── test/
│   │   │   └── index.test.ts
│   │   ├── tsconfig.json
│   │   └── typedoc.config.cjs
│   ├── adapter-supabase/
│   │   ├── .gitignore
│   │   ├── README.md
│   │   ├── package.json
│   │   ├── src/
│   │   │   └── index.ts
│   │   ├── supabase/
│   │   │   ├── config.toml
│   │   │   └── migrations/
│   │   │       ├── 20221108043803_create_next_auth_schema.sql
│   │   │       └── 20221108044627_create_public_users_table.sql
│   │   ├── test/
│   │   │   ├── index.test.ts
│   │   │   └── test.sh
│   │   ├── tsconfig.json
│   │   └── typedoc.config.cjs
│   ├── adapter-surrealdb/
│   │   ├── README.md
│   │   ├── package.json
│   │   ├── src/
│   │   │   └── index.ts
│   │   ├── test/
│   │   │   ├── common.ts
│   │   │   ├── index.test.ts
│   │   │   └── test.sh
│   │   ├── tsconfig.json
│   │   └── typedoc.config.cjs
│   ├── adapter-typeorm/
│   │   ├── .dockerignore
│   │   ├── README.md
│   │   ├── package.json
│   │   ├── src/
│   │   │   ├── entities.ts
│   │   │   ├── index.ts
│   │   │   └── utils.ts
│   │   ├── test/
│   │   │   ├── custom-entities.ts
│   │   │   ├── helpers.ts
│   │   │   ├── index.test.ts
│   │   │   ├── mysql/
│   │   │   │   ├── index.custom.test.ts
│   │   │   │   ├── index.test.ts
│   │   │   │   └── test.sh
│   │   │   ├── postgresql/
│   │   │   │   ├── index.custom.test.ts
│   │   │   │   ├── index.test.ts
│   │   │   │   └── test.sh
│   │   │   └── sqlite/
│   │   │       ├── index.custom.test.ts
│   │   │       ├── index.test.ts
│   │   │       └── test.sh
│   │   ├── tsconfig.json
│   │   └── typedoc.config.cjs
│   ├── adapter-unstorage/
│   │   ├── README.md
│   │   ├── package.json
│   │   ├── src/
│   │   │   └── index.ts
│   │   ├── test/
│   │   │   ├── filesystem.test.ts
│   │   │   ├── memory.test.ts
│   │   │   ├── redis-json.test.ts
│   │   │   ├── redis.test.ts
│   │   │   └── test.sh
│   │   ├── tsconfig.json
│   │   └── typedoc.config.cjs
│   ├── adapter-upstash-redis/
│   │   ├── README.md
│   │   ├── docker-compose.yml
│   │   ├── package.json
│   │   ├── src/
│   │   │   └── index.ts
│   │   ├── test/
│   │   │   ├── index.test.ts
│   │   │   └── test.sh
│   │   ├── tsconfig.json
│   │   └── typedoc.config.cjs
│   ├── adapter-xata/
│   │   ├── README.md
│   │   ├── package.json
│   │   ├── schema.json
│   │   ├── src/
│   │   │   ├── index.ts
│   │   │   └── xata.ts
│   │   ├── test/
│   │   │   └── index.test.ts
│   │   ├── tsconfig.json
│   │   └── typedoc.config.cjs
│   ├── core/
│   │   ├── README.md
│   │   ├── package.json
│   │   ├── scripts/
│   │   │   ├── generate-css.js
│   │   │   └── generate-providers.js
│   │   ├── src/
│   │   │   ├── adapters.ts
│   │   │   ├── errors.ts
│   │   │   ├── index.ts
│   │   │   ├── jwt.ts
│   │   │   ├── lib/
│   │   │   │   ├── actions/
│   │   │   │   │   ├── callback/
│   │   │   │   │   │   ├── handle-login.ts
│   │   │   │   │   │   ├── index.ts
│   │   │   │   │   │   └── oauth/
│   │   │   │   │   │       ├── callback.ts
│   │   │   │   │   │       ├── checks.ts
│   │   │   │   │   │       └── csrf-token.ts
│   │   │   │   │   ├── index.ts
│   │   │   │   │   ├── session.ts
│   │   │   │   │   ├── signin/
│   │   │   │   │   │   ├── authorization-url.ts
│   │   │   │   │   │   ├── index.ts
│   │   │   │   │   │   └── send-token.ts
│   │   │   │   │   ├── signout.ts
│   │   │   │   │   └── webauthn-options.ts
│   │   │   │   ├── index.ts
│   │   │   │   ├── init.ts
│   │   │   │   ├── pages/
│   │   │   │   │   ├── error.tsx
│   │   │   │   │   ├── index.ts
│   │   │   │   │   ├── signin.tsx
│   │   │   │   │   ├── signout.tsx
│   │   │   │   │   ├── styles.css
│   │   │   │   │   └── verify-request.tsx
│   │   │   │   ├── symbols.ts
│   │   │   │   ├── utils/
│   │   │   │   │   ├── actions.ts
│   │   │   │   │   ├── assert.ts
│   │   │   │   │   ├── callback-url.ts
│   │   │   │   │   ├── cookie.ts
│   │   │   │   │   ├── date.ts
│   │   │   │   │   ├── email.ts
│   │   │   │   │   ├── env.ts
│   │   │   │   │   ├── logger.ts
│   │   │   │   │   ├── merge.ts
│   │   │   │   │   ├── providers.ts
│   │   │   │   │   ├── session.ts
│   │   │   │   │   ├── web.ts
│   │   │   │   │   ├── webauthn-client.js
│   │   │   │   │   └── webauthn-utils.ts
│   │   │   │   └── vendored/
│   │   │   │       └── cookie.ts
│   │   │   ├── providers/
│   │   │   │   ├── 42-school.ts
│   │   │   │   ├── apple.ts
│   │   │   │   ├── asgardeo.ts
│   │   │   │   ├── atlassian.ts
│   │   │   │   ├── auth0.ts
│   │   │   │   ├── authentik.ts
│   │   │   │   ├── azure-ad-b2c.ts
│   │   │   │   ├── azure-ad.ts
│   │   │   │   ├── azure-devops.ts
│   │   │   │   ├── bankid-no.ts
│   │   │   │   ├── battlenet.ts
│   │   │   │   ├── beyondidentity.ts
│   │   │   │   ├── bitbucket.ts
│   │   │   │   ├── box.ts
│   │   │   │   ├── boxyhq-saml.ts
│   │   │   │   ├── bungie.ts
│   │   │   │   ├── click-up.ts
│   │   │   │   ├── cognito.ts
│   │   │   │   ├── coinbase.ts
│   │   │   │   ├── concept2.ts
│   │   │   │   ├── credentials.ts
│   │   │   │   ├── descope.ts
│   │   │   │   ├── discord.ts
│   │   │   │   ├── dribbble.ts
│   │   │   │   ├── dropbox.ts
│   │   │   │   ├── duende-identity-server6.ts
│   │   │   │   ├── email.ts
│   │   │   │   ├── eventbrite.ts
│   │   │   │   ├── eveonline.ts
│   │   │   │   ├── facebook.ts
│   │   │   │   ├── faceit.ts
│   │   │   │   ├── figma.ts
│   │   │   │   ├── forwardemail.ts
│   │   │   │   ├── foursquare.ts
│   │   │   │   ├── freshbooks.ts
│   │   │   │   ├── frontegg.ts
│   │   │   │   ├── fusionauth.ts
│   │   │   │   ├── github.ts
│   │   │   │   ├── gitlab.ts
│   │   │   │   ├── google.ts
│   │   │   │   ├── hubspot.ts
│   │   │   │   ├── huggingface.ts
│   │   │   │   ├── identity-server4.ts
│   │   │   │   ├── index.ts
│   │   │   │   ├── instagram.ts
│   │   │   │   ├── kakao.ts
│   │   │   │   ├── keycloak.ts
│   │   │   │   ├── kinde.ts
│   │   │   │   ├── line.ts
│   │   │   │   ├── linkedin.ts
│   │   │   │   ├── logto.ts
│   │   │   │   ├── loops.ts
│   │   │   │   ├── mailchimp.ts
│   │   │   │   ├── mailgun.ts
│   │   │   │   ├── mailru.ts
│   │   │   │   ├── mastodon.ts
│   │   │   │   ├── mattermost.ts
│   │   │   │   ├── medium.ts
│   │   │   │   ├── microsoft-entra-id.ts
│   │   │   │   ├── naver.ts
│   │   │   │   ├── netlify.ts
│   │   │   │   ├── netsuite.ts
│   │   │   │   ├── nextcloud.ts
│   │   │   │   ├── nodemailer.ts
│   │   │   │   ├── notion.ts
│   │   │   │   ├── oauth.ts
│   │   │   │   ├── okta.ts
│   │   │   │   ├── onelogin.ts
│   │   │   │   ├── ory-hydra.ts
│   │   │   │   ├── osso.ts
│   │   │   │   ├── osu.ts
│   │   │   │   ├── passage.ts
│   │   │   │   ├── passkey.ts
│   │   │   │   ├── patreon.ts
│   │   │   │   ├── ping-id.ts
│   │   │   │   ├── pinterest.ts
│   │   │   │   ├── pipedrive.ts
│   │   │   │   ├── postmark.ts
│   │   │   │   ├── reddit.ts
│   │   │   │   ├── resend.ts
│   │   │   │   ├── roblox.ts
│   │   │   │   ├── salesforce.ts
│   │   │   │   ├── sendgrid.ts
│   │   │   │   ├── simplelogin.ts
│   │   │   │   ├── slack.ts
│   │   │   │   ├── spotify.ts
│   │   │   │   ├── strava.ts
│   │   │   │   ├── threads.ts
│   │   │   │   ├── tiktok.ts
│   │   │   │   ├── todoist.ts
│   │   │   │   ├── trakt.ts
│   │   │   │   ├── twitch.ts
│   │   │   │   ├── twitter.ts
│   │   │   │   ├── united-effects.ts
│   │   │   │   ├── vipps.ts
│   │   │   │   ├── vk.ts
│   │   │   │   ├── webauthn.ts
│   │   │   │   ├── webex.ts
│   │   │   │   ├── wechat.ts
│   │   │   │   ├── wikimedia.ts
│   │   │   │   ├── wordpress.ts
│   │   │   │   ├── workos.ts
│   │   │   │   ├── yandex.ts
│   │   │   │   ├── zitadel.ts
│   │   │   │   ├── zoho.ts
│   │   │   │   └── zoom.ts
│   │   │   ├── types.ts
│   │   │   └── warnings.ts
│   │   ├── test/
│   │   │   ├── actions/
│   │   │   │   ├── callback.test.ts
│   │   │   │   ├── csrf.test.ts
│   │   │   │   └── session.test.ts
│   │   │   ├── assert-config.test.ts
│   │   │   ├── authorize.test.ts
│   │   │   ├── env.test.ts
│   │   │   ├── fixtures/
│   │   │   │   ├── oauth-callback.ts
│   │   │   │   └── pages.ts
│   │   │   ├── jwt.test.ts
│   │   │   ├── memory-adapter.ts
│   │   │   ├── merge.test.ts
│   │   │   ├── pages.test.ts
│   │   │   ├── providers/
│   │   │   │   └── gitlab.test.ts
│   │   │   ├── url-parsing.test.ts
│   │   │   ├── utils.ts
│   │   │   └── webauthn-utils.test.ts
│   │   ├── tsconfig.json
│   │   └── typedoc.config.cjs
│   ├── frameworks-express/
│   │   ├── README.md
│   │   ├── package.json
│   │   ├── src/
│   │   │   ├── adapters.ts
│   │   │   ├── index.ts
│   │   │   └── lib/
│   │   │       ├── http-api-adapters.ts
│   │   │       └── index.ts
│   │   ├── test/
│   │   │   ├── http-api-adapters/
│   │   │   │   ├── request.test.ts
│   │   │   │   └── response.test.ts
│   │   │   ├── login.test.ts
│   │   │   ├── routing.test.ts
│   │   │   └── session.test.ts
│   │   ├── tsconfig.json
│   │   └── typedoc.config.cjs
│   ├── frameworks-qwik/
│   │   ├── README.md
│   │   ├── package.json
│   │   ├── src/
│   │   │   ├── adapters.ts
│   │   │   └── index.ts
│   │   ├── tsconfig.json
│   │   ├── typedoc.config.cjs
│   │   └── vite.config.ts
│   ├── frameworks-solid-start/
│   │   ├── .gitignore
│   │   ├── README.MD
│   │   ├── package.json
│   │   ├── src/
│   │   │   ├── adapters.ts
│   │   │   ├── client.ts
│   │   │   └── index.ts
│   │   ├── test/
│   │   │   └── index.test.ts
│   │   ├── tsconfig.json
│   │   └── typedoc.config.cjs
│   ├── frameworks-sveltekit/
│   │   ├── README.md
│   │   ├── package.json
│   │   ├── playwright.config.ts
│   │   ├── scripts/
│   │   │   └── postbuild.js
│   │   ├── src/
│   │   │   └── lib/
│   │   │       ├── actions.ts
│   │   │       ├── adapters.ts
│   │   │       ├── client.ts
│   │   │       ├── components/
│   │   │       │   ├── SignIn.svelte
│   │   │       │   ├── SignOut.svelte
│   │   │       │   └── index.ts
│   │   │       ├── env.ts
│   │   │       ├── index.ts
│   │   │       ├── types.ts
│   │   │       └── webauthn.ts
│   │   ├── test/
│   │   │   └── index.test.ts
│   │   ├── tsconfig.json
│   │   └── typedoc.config.cjs
│   ├── frameworks-template/
│   │   ├── README.md
│   │   ├── package.json
│   │   ├── src/
│   │   │   └── index.ts
│   │   ├── test/
│   │   │   ├── index.test.ts
│   │   │   └── test-setup.ts
│   │   ├── tsconfig.json
│   │   └── typedoc.config.cjs
│   ├── next-auth/
│   │   ├── README.md
│   │   ├── package.json
│   │   ├── playwright.config.ts
│   │   ├── src/
│   │   │   ├── adapters.ts
│   │   │   ├── index.ts
│   │   │   ├── jwt.ts
│   │   │   ├── lib/
│   │   │   │   ├── actions.ts
│   │   │   │   ├── client.ts
│   │   │   │   ├── env.ts
│   │   │   │   ├── index.ts
│   │   │   │   └── types.ts
│   │   │   ├── middleware.ts
│   │   │   ├── next.ts
│   │   │   ├── react.tsx
│   │   │   └── webauthn.ts
│   │   ├── test/
│   │   │   ├── actions.test.ts
│   │   │   ├── e2e/
│   │   │   │   ├── fixtures/
│   │   │   │   │   ├── auth.ts
│   │   │   │   │   └── webApp.ts
│   │   │   │   ├── helpers/
│   │   │   │   │   └── authTest.ts
│   │   │   │   ├── poms/
│   │   │   │   │   └── keycloakLoginPom.ts
│   │   │   │   └── tests/
│   │   │   │       ├── api/
│   │   │   │       │   └── session.spec.ts
│   │   │   │       └── providers/
│   │   │   │           ├── credentials.spec.ts
│   │   │   │           └── keycloak.spec.ts
│   │   │   └── env.test.ts
│   │   ├── tsconfig.json
│   │   └── typedoc.config.cjs
│   └── utils/
│       ├── adapter.ts
│       ├── package.json
│       ├── scripts/
│       │   ├── providers.js
│       │   └── setup-fw-integration.js
│       ├── tsconfig.eslint.json
│       ├── tsconfig.json
│       ├── vitest-setup.ts
│       └── vitest.config.ts
├── patches/
│   └── @balazsorban__monorepo-release@0.5.1.patch
├── pnpm-workspace.yaml
└── turbo.json
Download .txt
SYMBOL INDEX (1202 symbols across 374 files)

FILE: .github/broken-link-checker/src/index.ts
  type TODO (line 5) | type TODO = any
  type Output (line 6) | type Output = {
  type Comment (line 12) | type Comment = {
  type FindBotComment (line 15) | type FindBotComment = {
  constant COMMENT_TAG (line 22) | const COMMENT_TAG = "# Broken Link Checker"
  function findBotComment (line 24) | async function findBotComment({
  function updateCheckStatus (line 44) | async function updateCheckStatus(
  function brokenLinkChecker (line 192) | async function brokenLinkChecker(): Promise<void> {

FILE: apps/dev/express/src/errors.ts
  class HttpError (line 1) | class HttpError extends Error {
    method constructor (line 3) | constructor(status: number, message: string) {
  class NotFoundError (line 9) | class NotFoundError extends HttpError {
    method constructor (line 10) | constructor(message: string, status = 404) {

FILE: apps/dev/express/src/middleware/auth.middleware.ts
  function authenticatedUser (line 5) | async function authenticatedUser(
  function currentSession (line 21) | async function currentSession(

FILE: apps/dev/nextjs/app/api/protected/route.ts
  constant GET (line 4) | const GET = auth(function GET(req) {

FILE: apps/dev/nextjs/app/client.tsx
  function Client (line 6) | function Client() {

FILE: apps/dev/nextjs/app/dashboard/page.tsx
  function Page (line 1) | function Page() {

FILE: apps/dev/nextjs/app/layout.tsx
  function RootLayout (line 8) | function RootLayout(props: { children: React.ReactNode }) {
  function AppHeader (line 20) | async function AppHeader() {

FILE: apps/dev/nextjs/app/page.tsx
  function Page (line 7) | async function Page() {

FILE: apps/dev/nextjs/auth.ts
  type Session (line 43) | interface Session {
  type User (line 50) | interface User {
  method authorize (line 60) | authorize(c) {
  method jwt (line 74) | jwt({ token, trigger, session }) {

FILE: apps/dev/nextjs/components/access-denied.tsx
  function AccessDenied (line 3) | function AccessDenied() {

FILE: apps/dev/nextjs/components/footer.tsx
  function Footer (line 5) | function Footer() {

FILE: apps/dev/nextjs/components/header.tsx
  function Header (line 5) | function Header({

FILE: apps/dev/nextjs/next.config.js
  method webpack (line 3) | webpack(config) {

FILE: apps/dev/nextjs/pages/_app.tsx
  function App (line 7) | function App({ Component, pageProps }) {
  function PagesHeader (line 17) | function PagesHeader() {

FILE: apps/dev/nextjs/pages/api/examples/protected.ts
  function handler (line 5) | async function handler(...args: Parameters<NextApiHandler>) {

FILE: apps/dev/nextjs/pages/client.tsx
  function Page (line 1) | function Page() {

FILE: apps/dev/nextjs/pages/credentials.tsx
  function Page (line 5) | function Page() {

FILE: apps/dev/nextjs/pages/email.tsx
  function Page (line 5) | function Page() {

FILE: apps/dev/nextjs/pages/policy.tsx
  function Page (line 1) | function Page() {

FILE: apps/dev/nextjs/pages/protected-ssr.tsx
  function Page (line 6) | function Page({ content, session }) {

FILE: apps/dev/nextjs/pages/protected.tsx
  function Page (line 4) | function Page() {

FILE: apps/dev/nextjs/prisma/migrations/20231023165117_/migration.sql
  type "Account" (line 2) | CREATE TABLE "Account" (
  type "Session" (line 19) | CREATE TABLE "Session" (
  type "User" (line 28) | CREATE TABLE "User" (
  type "VerificationToken" (line 37) | CREATE TABLE "VerificationToken" (
  type "Account" (line 44) | CREATE UNIQUE INDEX "Account_provider_providerAccountId_key" ON "Account...
  type "Session" (line 47) | CREATE UNIQUE INDEX "Session_sessionToken_key" ON "Session"("sessionToken")
  type "User" (line 50) | CREATE UNIQUE INDEX "User_email_key" ON "User"("email")
  type "VerificationToken" (line 53) | CREATE UNIQUE INDEX "VerificationToken_token_key" ON "VerificationToken"...
  type "VerificationToken" (line 56) | CREATE UNIQUE INDEX "VerificationToken_identifier_token_key" ON "Verific...

FILE: apps/dev/nextjs/prisma/migrations/20240124035029_init/migration.sql
  type "Account" (line 2) | CREATE TABLE "Account" (
  type "Session" (line 20) | CREATE TABLE "Session" (
  type "User" (line 29) | CREATE TABLE "User" (
  type "VerificationToken" (line 38) | CREATE TABLE "VerificationToken" (
  type "Authenticator" (line 45) | CREATE TABLE "Authenticator" (
  type "Session" (line 59) | CREATE UNIQUE INDEX "Session_sessionToken_key" ON "Session"("sessionToken")
  type "User" (line 62) | CREATE UNIQUE INDEX "User_email_key" ON "User"("email")
  type "VerificationToken" (line 65) | CREATE UNIQUE INDEX "VerificationToken_token_key" ON "VerificationToken"...
  type "VerificationToken" (line 68) | CREATE UNIQUE INDEX "VerificationToken_identifier_token_key" ON "Verific...
  type "Authenticator" (line 71) | CREATE UNIQUE INDEX "Authenticator_credentialID_key" ON "Authenticator"(...

FILE: apps/dev/qwik/src/routes/plugin@auth.ts
  type Session (line 5) | interface Session {

FILE: apps/dev/qwik/vite.config.ts
  type PkgDep (line 11) | type PkgDep = Record<string, string>
  function errorOnDuplicatesPkgDeps (line 71) | function errorOnDuplicatesPkgDeps(

FILE: apps/dev/sveltekit/src/auth.ts
  method authorize (line 26) | async authorize(credentials) {

FILE: apps/examples/express/src/errors.ts
  class HttpError (line 1) | class HttpError extends Error {
    method constructor (line 3) | constructor(status: number, message: string) {
  class NotFoundError (line 9) | class NotFoundError extends HttpError {
    method constructor (line 10) | constructor(message: string, status = 404) {

FILE: apps/examples/express/src/middleware/auth.middleware.ts
  function authenticatedUser (line 6) | async function authenticatedUser(
  function currentSession (line 23) | async function currentSession(

FILE: apps/examples/express/types/express/index.d.ts
  type Response (line 4) | interface Response {

FILE: apps/examples/nextjs-pages/auth.ts
  method authorized (line 135) | authorized({ request, auth }) {
  method jwt (line 140) | jwt({ token, trigger, session }) {

FILE: apps/examples/nextjs-pages/components/auth-components.tsx
  function SignIn (line 4) | function SignIn({
  function SignOut (line 15) | function SignOut(props: React.ComponentPropsWithRef<typeof Button>) {

FILE: apps/examples/nextjs-pages/components/client-example.tsx
  function ClientExample (line 43) | function ClientExample() {

FILE: apps/examples/nextjs-pages/components/custom-link.tsx
  type CustomLinkProps (line 5) | interface CustomLinkProps extends React.LinkHTMLAttributes<HTMLAnchorEle...

FILE: apps/examples/nextjs-pages/components/footer.tsx
  function Footer (line 3) | function Footer() {

FILE: apps/examples/nextjs-pages/components/header.tsx
  function Header (line 4) | function Header() {

FILE: apps/examples/nextjs-pages/components/main-nav.tsx
  function MainNav (line 16) | function MainNav() {

FILE: apps/examples/nextjs-pages/components/session-data.tsx
  function SessionData (line 3) | function SessionData({ session }: { session: Session | null }) {

FILE: apps/examples/nextjs-pages/components/ui/button.tsx
  type ButtonProps (line 36) | interface ButtonProps

FILE: apps/examples/nextjs-pages/components/ui/input.tsx
  type InputProps (line 5) | interface InputProps

FILE: apps/examples/nextjs-pages/components/user-button.tsx
  function UserButton (line 13) | function UserButton() {

FILE: apps/examples/nextjs-pages/lib/utils.ts
  function cn (line 4) | function cn(...inputs: ClassValue[]) {

FILE: apps/examples/nextjs-pages/pages/_app.tsx
  function MyApp (line 11) | function MyApp({

FILE: apps/examples/nextjs-pages/pages/api-example/index.tsx
  function Page (line 4) | function Page() {

FILE: apps/examples/nextjs-pages/pages/api/protected.ts
  function handler (line 5) | async function handler(

FILE: apps/examples/nextjs-pages/pages/client-example/index.tsx
  function ClientPage (line 5) | function ClientPage() {

FILE: apps/examples/nextjs-pages/pages/index.tsx
  function Index (line 3) | function Index() {

FILE: apps/examples/nextjs-pages/pages/middleware-example/index.tsx
  function Page (line 3) | function Page() {

FILE: apps/examples/nextjs-pages/pages/policy/index.tsx
  function PolicyPage (line 1) | function PolicyPage() {

FILE: apps/examples/nextjs-pages/pages/server-example/index.tsx
  function Page (line 9) | function Page({

FILE: apps/examples/nextjs/app/[...proxy]/route.tsx
  function stripContentEncoding (line 5) | function stripContentEncoding(result: Response) {
  function handler (line 16) | async function handler(request: NextRequest) {

FILE: apps/examples/nextjs/app/api-example/page.tsx
  function Page (line 5) | function Page() {

FILE: apps/examples/nextjs/app/api/protected/route.ts
  constant GET (line 3) | const GET = auth((req) => {

FILE: apps/examples/nextjs/app/client-example/page.tsx
  function ClientPage (line 5) | async function ClientPage() {

FILE: apps/examples/nextjs/app/layout.tsx
  function RootLayout (line 15) | function RootLayout({ children }: React.PropsWithChildren) {

FILE: apps/examples/nextjs/app/middleware-example/page.tsx
  function Page (line 3) | function Page() {

FILE: apps/examples/nextjs/app/page.tsx
  function Index (line 4) | async function Index() {

FILE: apps/examples/nextjs/app/policy/page.tsx
  function PolicyPage (line 1) | function PolicyPage() {

FILE: apps/examples/nextjs/app/server-example/page.tsx
  function Page (line 5) | async function Page() {

FILE: apps/examples/nextjs/auth.ts
  method authorized (line 106) | authorized({ request, auth }) {
  method jwt (line 111) | jwt({ token, trigger, session, account }) {
  method session (line 118) | async session({ session, token }) {
  type Session (line 128) | interface Session {
  type JWT (line 134) | interface JWT {

FILE: apps/examples/nextjs/components/auth-components.tsx
  function SignIn (line 4) | function SignIn({
  function SignOut (line 20) | function SignOut(props: React.ComponentPropsWithRef<typeof Button>) {

FILE: apps/examples/nextjs/components/client-example.tsx
  function ClientExample (line 35) | function ClientExample() {

FILE: apps/examples/nextjs/components/custom-link.tsx
  type CustomLinkProps (line 5) | interface CustomLinkProps extends React.LinkHTMLAttributes<HTMLAnchorEle...

FILE: apps/examples/nextjs/components/footer.tsx
  function Footer (line 4) | function Footer() {

FILE: apps/examples/nextjs/components/header.tsx
  function Header (line 4) | function Header() {

FILE: apps/examples/nextjs/components/main-nav.tsx
  function MainNav (line 19) | function MainNav() {

FILE: apps/examples/nextjs/components/session-data.tsx
  function SessionData (line 3) | function SessionData({ session }: { session: Session | null }) {

FILE: apps/examples/nextjs/components/ui/button.tsx
  type ButtonProps (line 36) | interface ButtonProps

FILE: apps/examples/nextjs/components/ui/input.tsx
  type InputProps (line 5) | interface InputProps

FILE: apps/examples/nextjs/components/user-button.tsx
  function UserButton (line 13) | async function UserButton() {

FILE: apps/examples/nextjs/lib/utils.ts
  function cn (line 4) | function cn(...inputs: ClassValue[]) {

FILE: apps/examples/qwik/src/components/avatar/avatar.tsx
  type Props (line 3) | type Props = {

FILE: apps/examples/qwik/src/entry.vercel-edge.tsx
  type QwikCityPlatform (line 19) | interface QwikCityPlatform extends PlatformVercel {}

FILE: apps/examples/qwik/vite.config.ts
  type PkgDep (line 11) | type PkgDep = Record<string, string>;
  function errorOnDuplicatesPkgDeps (line 71) | function errorOnDuplicatesPkgDeps(

FILE: apps/examples/solid-start/src/components/NavBar/NavBar.tsx
  type INavBarProps (line 8) | interface INavBarProps {}

FILE: apps/examples/solid-start/src/components/Protected/Protected.tsx
  type IProtectedComponent (line 34) | type IProtectedComponent = Component<Session>

FILE: apps/examples/solid-start/src/root.tsx
  function Root (line 17) | function Root() {

FILE: apps/proxy/api/[auth].ts
  method profile (line 86) | profile(profile: any) {
  function handler (line 99) | function handler(req: Request) {

FILE: docs/app/api/cron/route.ts
  function GET (line 4) | async function GET(req: NextRequest) {

FILE: docs/app/api/og/route.tsx
  function GET (line 18) | async function GET(request: NextRequest) {
  function OG (line 42) | function OG({

FILE: docs/components/Accordion/index.tsx
  function CopyButton (line 129) | function CopyButton({ id }: { id: string }): JSX.Element {

FILE: docs/components/Blur/index.tsx
  function Blur (line 1) | function Blur() {

FILE: docs/components/Code/index.tsx
  type ChildrenProps (line 7) | interface ChildrenProps {
  constant AUTHJS_TAB_KEY (line 11) | const AUTHJS_TAB_KEY = "authjs.codeTab.framework"
  constant AUTHJS_TAB_KEY_ALL (line 12) | const AUTHJS_TAB_KEY_ALL = "authjs.codeTab.framework.all"
  function Code (line 116) | function Code({ children }: ChildrenProps) {
  function NextClientCode (line 221) | function NextClientCode({ children }: ChildrenProps) {
  function NextCode (line 225) | function NextCode({ children }: ChildrenProps) {
  function SvelteCode (line 229) | function SvelteCode({ children }: ChildrenProps) {
  function ExpressCode (line 237) | function ExpressCode({ children }: ChildrenProps) {
  function QwikCode (line 241) | function QwikCode({ children }: ChildrenProps) {

FILE: docs/components/DocSearch/wrapper.tsx
  function App (line 7) | function App() {

FILE: docs/components/Footer/index.tsx
  function kFormatter (line 4) | function kFormatter(num: number) {
  function Footer (line 8) | function Footer({ className = "" }) {

FILE: docs/components/FrameworkLink/index.tsx
  type FrameworkLinkProps (line 6) | interface FrameworkLinkProps {
  function FrameworkLink (line 15) | function FrameworkLink({

FILE: docs/components/Guides/index.tsx
  function Guides (line 12) | function Guides() {

FILE: docs/components/Icons/ArrowRight.tsx
  type Props (line 1) | type Props = {
  function ArrowRight (line 5) | function ArrowRight({ className }: Props) {

FILE: docs/components/Icons/ArrowSquareOut.tsx
  type Props (line 1) | type Props = {
  function ArrowSquareOut (line 5) | function ArrowSquareOut({ className }: Props) {

FILE: docs/components/Icons/Browser.tsx
  type Props (line 1) | type Props = {
  function Browser (line 5) | function Browser({ className }: Props) {

FILE: docs/components/Icons/CaretRight.tsx
  type Props (line 1) | type Props = {
  function CaretRight (line 5) | function CaretRight({ className }: Props) {

FILE: docs/components/Icons/ChatCircleText.tsx
  type Props (line 1) | type Props = {
  function ChatCircleText (line 5) | function ChatCircleText({ className }: Props) {

FILE: docs/components/Icons/Check.tsx
  type Props (line 1) | type Props = {
  function Check (line 5) | function Check({ className }: Props) {

FILE: docs/components/Icons/Flask.tsx
  type Props (line 1) | type Props = {
  function Flask (line 5) | function Flask({ className }: Props) {

FILE: docs/components/Icons/GitBranch.tsx
  type Props (line 1) | type Props = {
  function GitBranch (line 5) | function GitBranch({ className }: Props) {

FILE: docs/components/Icons/GithubLogo.tsx
  type Props (line 1) | type Props = {
  function GithubLogo (line 5) | function GithubLogo({ className }: Props) {

FILE: docs/components/Icons/Link.tsx
  type Props (line 1) | type Props = {
  function Link (line 5) | function Link({ className }: Props) {

FILE: docs/components/Icons/Plus.tsx
  type Props (line 1) | type Props = {
  function Plus (line 5) | function Plus({ className }: Props) {

FILE: docs/components/Icons/SealWarning.tsx
  type Props (line 1) | type Props = {
  function SealWarning (line 5) | function SealWarning({ className }: Props) {

FILE: docs/components/Icons/ShieldStar.tsx
  type Props (line 1) | type Props = {
  function ShieldStar (line 5) | function ShieldStar({ className }: Props) {

FILE: docs/components/Icons/Sparkle.tsx
  type Props (line 1) | type Props = {
  function Sparkle (line 5) | function Sparkle({ className }: Props) {

FILE: docs/components/InkeepSearch/index.tsx
  function InkeepTrigger (line 6) | function InkeepTrigger() {

FILE: docs/components/Link/index.tsx
  function Link (line 3) | function Link({

FILE: docs/components/ListDisclosure/index.tsx
  type Props (line 4) | interface Props {
  function ListDisclosure (line 10) | function ListDisclosure({ children, limit, className = "" }: Props) {

FILE: docs/components/ListDisclosure/useListDisclosure.ts
  function useListDisclosure (line 3) | function useListDisclosure(initialLimit: number) {

FILE: docs/components/LogosMarquee/index.tsx
  function changeScale (line 12) | function changeScale() {
  function changeLogoCount (line 19) | function changeLogoCount() {
  function handleEvent (line 32) | function handleEvent() {

FILE: docs/components/LogosMarquee/logo.tsx
  function randomFloat (line 5) | function randomFloat(min: number, max: number): number {

FILE: docs/components/OAuthProviderInstructions/OAuthProviderSelect.tsx
  function OAuthProviderSelect (line 33) | function OAuthProviderSelect() {

FILE: docs/components/OAuthProviderInstructions/content/components/SetupCode.tsx
  type Props (line 5) | interface Props {
  function SetupCode (line 11) | function SetupCode({ providerId, providerSymbol, highlight }: Props) {

FILE: docs/components/OAuthProviderInstructions/content/components/SignInCode.tsx
  type Props (line 5) | interface Props {
  function SignInCode (line 11) | function SignInCode({ providerId, providerName, highlight }: Props) {

FILE: docs/components/OAuthProviderInstructions/content/components/StepTitle.tsx
  type Props (line 1) | interface Props {
  function StepTitle (line 6) | function StepTitle({ children, count }: Props) {

FILE: docs/components/OAuthProviderInstructions/content/components/TSIcon.tsx
  function TSIcon (line 1) | function TSIcon() {

FILE: docs/components/OAuthProviderInstructions/content/index.tsx
  type Props (line 12) | interface Props {
  function OAuthInstructions (line 17) | function OAuthInstructions({ providerId, disabled = false }: Props) {

FILE: docs/components/RichTabs/index.tsx
  type Props (line 60) | type Props = TabsProps & { onTabChange?: (value: string) => void } & {
  function RichTabs (line 65) | function RichTabs({

FILE: docs/components/RichTabs/useRichTabs.ts
  type Args (line 3) | interface Args {
  function useRichTabs (line 12) | function useRichTabs({

FILE: docs/components/Screenshot/index.tsx
  function Screenshot (line 4) | function Screenshot({ src, alt, full, className }) {

FILE: docs/components/SearchBarProviders/PreviewProviders.tsx
  type Provider (line 1) | interface Provider {
  type PreviewProvidersProps (line 6) | interface PreviewProvidersProps {
  function PreviewProviders (line 12) | function PreviewProviders({

FILE: docs/hooks/use-select-combobox.ts
  type SelectComboboxValue (line 3) | interface SelectComboboxValue {
  type SelectComboboxProps (line 8) | interface SelectComboboxProps {

FILE: docs/pages/_app.tsx
  function App (line 6) | function App({ Component, pageProps }) {

FILE: docs/pages/_document.tsx
  class AuthDocument (line 4) | class AuthDocument extends Document {
    method render (line 5) | render() {

FILE: docs/typedoc-nextauth.js
  function load (line 12) | function load(app) {
  function injectNextraCalloutImport (line 23) | function injectNextraCalloutImport(app) {
  function parseOutput (line 34) | function parseOutput(app) {
  function writeMetaJsFiles (line 70) | function writeMetaJsFiles(app) {

FILE: docs/types.d.ts
  type TODO (line 11) | type TODO = any

FILE: docs/utils/types.ts
  type ChildrenProps (line 1) | interface ChildrenProps {

FILE: docs/utils/useCopyButton.ts
  function useCopyButton (line 9) | function useCopyButton(

FILE: docs/utils/useInkeepSettings.ts
  type InkeepSharedSettings (line 9) | type InkeepSharedSettings = {

FILE: packages/adapter-azure-tables/src/index.ts
  function withoutKeys (line 41) | function withoutKeys<T>(
  method createUser (line 57) | async createUser(user) {
  method getUser (line 77) | async getUser(id: string) {
  method getUserByEmail (line 85) | async getUserByEmail(email) {
  method getUserByAccount (line 96) | async getUserByAccount({ providerAccountId, provider }) {
  method updateUser (line 112) | async updateUser(user) {
  method deleteUser (line 122) | async deleteUser(userId) {
  method linkAccount (line 148) | async linkAccount(account) {
  method unlinkAccount (line 165) | async unlinkAccount({ providerAccountId, provider }) {
  method createSession (line 174) | async createSession(session) {
  method getSessionAndUser (line 187) | async getSessionAndUser(sessionToken) {
  method updateSession (line 208) | async updateSession(session) {
  method deleteSession (line 223) | async deleteSession(sessionToken) {
  method createVerificationToken (line 238) | async createVerificationToken(token) {
  method useVerificationToken (line 246) | async useVerificationToken({ identifier, token }) {

FILE: packages/adapter-azure-tables/test/index.test.ts
  method connect (line 34) | async connect() {
  method user (line 42) | async user(id) {
  method account (line 52) | async account(provider_providerAccountId) {
  method session (line 64) | async session(sessionToken) {
  method verificationToken (line 73) | async verificationToken(identifier_token) {

FILE: packages/adapter-d1/src/index.ts
  type D1Database (line 58) | type D1Database = WorkerDatabase | MiniflareD1Database
  function format (line 61) | function format<T>(obj: Record<string, any>): T {
  function cleanBindings (line 76) | function cleanBindings(bindings: any[]) {
  function createRecord (line 80) | async function createRecord<RecordType>(
  function getRecord (line 100) | async function getRecord<RecordType>(
  function updateRecord (line 122) | async function updateRecord(
  function deleteRecord (line 139) | async function deleteRecord(
  function D1Adapter (line 156) | function D1Adapter(db: D1Database): Adapter {

FILE: packages/adapter-d1/src/migrations.ts
  function up (line 51) | async function up(db: D1Database) {

FILE: packages/adapter-d1/src/queries.ts
  constant CREATE_USER_SQL (line 2) | const CREATE_USER_SQL = `INSERT INTO users (id, name, email, emailVerifi...
  constant GET_USER_BY_ID_SQL (line 3) | const GET_USER_BY_ID_SQL = `SELECT * FROM users WHERE id = ?`
  constant GET_USER_BY_EMAIL_SQL (line 4) | const GET_USER_BY_EMAIL_SQL = `SELECT * FROM users WHERE email = ?`
  constant GET_USER_BY_ACCOUNTL_SQL (line 5) | const GET_USER_BY_ACCOUNTL_SQL = `
  constant UPDATE_USER_BY_ID_SQL (line 9) | const UPDATE_USER_BY_ID_SQL = `
  constant DELETE_USER_SQL (line 13) | const DELETE_USER_SQL = `DELETE FROM users WHERE id = ?`
  constant CREATE_SESSION_SQL (line 16) | const CREATE_SESSION_SQL =
  constant GET_SESSION_BY_TOKEN_SQL (line 18) | const GET_SESSION_BY_TOKEN_SQL = `
  constant UPDATE_SESSION_BY_SESSION_TOKEN_SQL (line 22) | const UPDATE_SESSION_BY_SESSION_TOKEN_SQL = `UPDATE sessions SET expires...
  constant DELETE_SESSION_SQL (line 23) | const DELETE_SESSION_SQL = `DELETE FROM sessions WHERE sessionToken = ?`
  constant DELETE_SESSION_BY_USER_ID_SQL (line 24) | const DELETE_SESSION_BY_USER_ID_SQL = `DELETE FROM sessions WHERE userId...
  constant CREATE_ACCOUNT_SQL (line 27) | const CREATE_ACCOUNT_SQL = `
  constant GET_ACCOUNT_BY_ID_SQL (line 35) | const GET_ACCOUNT_BY_ID_SQL = `SELECT * FROM accounts WHERE id = ? `
  constant GET_ACCOUNT_BY_PROVIDER_AND_PROVIDER_ACCOUNT_ID_SQL (line 36) | const GET_ACCOUNT_BY_PROVIDER_AND_PROVIDER_ACCOUNT_ID_SQL = `SELECT * FR...
  constant DELETE_ACCOUNT_BY_PROVIDER_AND_PROVIDER_ACCOUNT_ID_SQL (line 37) | const DELETE_ACCOUNT_BY_PROVIDER_AND_PROVIDER_ACCOUNT_ID_SQL = `DELETE F...
  constant DELETE_ACCOUNT_BY_USER_ID_SQL (line 38) | const DELETE_ACCOUNT_BY_USER_ID_SQL = `DELETE FROM accounts WHERE userId...
  constant GET_VERIFICATION_TOKEN_BY_IDENTIFIER_AND_TOKEN_SQL (line 41) | const GET_VERIFICATION_TOKEN_BY_IDENTIFIER_AND_TOKEN_SQL = `SELECT * FRO...
  constant CREATE_VERIFICATION_TOKEN_SQL (line 42) | const CREATE_VERIFICATION_TOKEN_SQL = `INSERT INTO verification_tokens (...
  constant DELETE_VERIFICATION_TOKEN_SQL (line 43) | const DELETE_VERIFICATION_TOKEN_SQL = `DELETE FROM verification_tokens W...

FILE: packages/adapter-dgraph/src/index.ts
  type DgraphAdapterOptions (line 31) | interface DgraphAdapterOptions {
  function DgraphAdapter (line 47) | function DgraphAdapter(
  method from (line 350) | from<T>(object?: Record<string, any>): T | null {

FILE: packages/adapter-dgraph/src/lib/client.ts
  type DgraphClientParams (line 3) | interface DgraphClientParams {
  class DgraphClientError (line 27) | class DgraphClientError extends Error {
    method constructor (line 29) | constructor(errors: any[], query: string, variables: any) {
  function client (line 35) | function client(params: DgraphClientParams) {

FILE: packages/adapter-dgraph/test/index.test.ts
  method disconnect (line 26) | async disconnect() {
  method user (line 44) | async user(id) {
  method session (line 59) | async session(sessionToken) {
  method account (line 79) | async account(provider_providerAccountId) {
  method verificationToken (line 107) | async verificationToken(identifier_token) {

FILE: packages/adapter-drizzle/src/index.ts
  function DrizzleAdapter (line 30) | function DrizzleAdapter<SqlFlavor extends SqlFlavorOptions>(

FILE: packages/adapter-drizzle/src/lib/mysql.ts
  function defineTables (line 27) | function defineTables(
  function MySqlDrizzleAdapter (line 138) | function MySqlDrizzleAdapter(
  type DefaultMyqlColumn (line 381) | type DefaultMyqlColumn<
  type DefaultMySqlUsersTable (line 410) | type DefaultMySqlUsersTable = MySqlTableWithColumns<{
  type DefaultMySqlAccountsTable (line 449) | type DefaultMySqlAccountsTable = MySqlTableWithColumns<{
  type DefaultMySqlSessionsTable (line 524) | type DefaultMySqlSessionsTable = MySqlTableWithColumns<{
  type DefaultMySqlVerificationTokenTable (line 551) | type DefaultMySqlVerificationTokenTable = MySqlTableWithColumns<{
  type DefaultMySqlAuthenticatorTable (line 577) | type DefaultMySqlAuthenticatorTable = MySqlTableWithColumns<{
  type DefaultMySqlSchema (line 633) | type DefaultMySqlSchema = {

FILE: packages/adapter-drizzle/src/lib/pg.ts
  function defineTables (line 26) | function defineTables(
  function PostgresDrizzleAdapter (line 125) | function PostgresDrizzleAdapter(
  type DefaultPostgresColumn (line 329) | type DefaultPostgresColumn<
  type DefaultPostgresUsersTable (line 359) | type DefaultPostgresUsersTable = PgTableWithColumns<{
  type DefaultPostgresAccountsTable (line 398) | type DefaultPostgresAccountsTable = PgTableWithColumns<{
  type DefaultPostgresSessionsTable (line 472) | type DefaultPostgresSessionsTable = PgTableWithColumns<{
  type DefaultPostgresVerificationTokenTable (line 499) | type DefaultPostgresVerificationTokenTable = PgTableWithColumns<{
  type DefaultPostgresAuthenticatorTable (line 525) | type DefaultPostgresAuthenticatorTable = PgTableWithColumns<{
  type DefaultPostgresSchema (line 581) | type DefaultPostgresSchema = {

FILE: packages/adapter-drizzle/src/lib/sqlite.ts
  function defineTables (line 23) | function defineTables(
  function SQLiteDrizzleAdapter (line 124) | function SQLiteDrizzleAdapter(
  type DefaultSQLiteColumn (line 337) | type DefaultSQLiteColumn<
  type DefaultSQLiteUsersTable (line 365) | type DefaultSQLiteUsersTable = SQLiteTableWithColumns<{
  type DefaultSQLiteAccountsTable (line 404) | type DefaultSQLiteAccountsTable = SQLiteTableWithColumns<{
  type DefaultSQLiteSessionsTable (line 478) | type DefaultSQLiteSessionsTable = SQLiteTableWithColumns<{
  type DefaultSQLiteVerificationTokenTable (line 505) | type DefaultSQLiteVerificationTokenTable = SQLiteTableWithColumns<{
  type DefaultSQLiteAuthenticatorTable (line 531) | type DefaultSQLiteAuthenticatorTable = SQLiteTableWithColumns<{
  type DefaultSQLiteSchema (line 587) | type DefaultSQLiteSchema = {

FILE: packages/adapter-drizzle/src/lib/utils.ts
  type AnyPostgresDatabase (line 12) | type AnyPostgresDatabase = PgDatabase<PgQueryResultHKT, any>
  type AnyMySqlDatabase (line 13) | type AnyMySqlDatabase = MySqlDatabase<
  type AnySQLiteDatabase (line 18) | type AnySQLiteDatabase = BaseSQLiteDatabase<"sync" | "async", any, any>
  type SqlFlavorOptions (line 20) | type SqlFlavorOptions =
  type DefaultSchema (line 25) | type DefaultSchema<Flavor extends SqlFlavorOptions> =

FILE: packages/adapter-drizzle/test/fixtures.ts
  constant ONE_WEEK_FROM_NOW (line 9) | const ONE_WEEK_FROM_NOW = new Date(Date.now() + 1000 * 60 * 60 * 24 * 7)
  constant FIFTEEN_MINUTES_FROM_NOW (line 11) | const FIFTEEN_MINUTES_FROM_NOW = new Date(Date.now() + 15 * 60 * 1000)
  constant ONE_MONTH (line 14) | const ONE_MONTH = 1000 * 60 * 60 * 24 * 30
  constant ONE_MONTH_FROM_NOW (line 15) | const ONE_MONTH_FROM_NOW = new Date(Date.now() + ONE_MONTH)

FILE: packages/adapter-dynamodb/src/index.ts
  type DynamoDBAdapterOptions (line 31) | interface DynamoDBAdapterOptions {
  function DynamoDBAdapter (line 40) | function DynamoDBAdapter(
  method to (line 349) | to(object: Record<string, any>) {
  method from (line 362) | from<T = Record<string, unknown>>(object?: Record<string, any>): T | null {
  function generateUpdateExpression (line 386) | function generateUpdateExpression(object: Record<string, any>): {

FILE: packages/adapter-dynamodb/test/index.test.ts
  method user (line 31) | async user(id) {
  method session (line 42) | async session(token) {
  method account (line 59) | async account({ provider, providerAccountId }) {
  method verificationToken (line 76) | async verificationToken({ token, identifier }) {

FILE: packages/adapter-edgedb/src/index.ts
  function EdgeDBAdapter (line 27) | function EdgeDBAdapter(client: Client): Adapter {

FILE: packages/adapter-edgedb/test/index.test.ts
  method verificationToken (line 79) | async verificationToken({ token, identifier }) {

FILE: packages/adapter-fauna/src/index.ts
  type ToFauna (line 34) | type ToFauna<T> = {
  type FaunaUser (line 44) | type FaunaUser = ToFauna<AdapterUser>
  type FaunaSession (line 45) | type FaunaSession = ToFauna<AdapterSession>
  type FaunaVerificationToken (line 46) | type FaunaVerificationToken = ToFauna<VerificationToken> & { id: string }
  type FaunaAccount (line 47) | type FaunaAccount = ToFauna<AdapterAccount>
  type AdapterConfig (line 49) | type AdapterConfig = {
  function FaunaAdapter (line 65) | function FaunaAdapter(client: Client, config?: AdapterConfig): Adapter {
  method from (line 203) | from<T>(object: Record<string, any> = {}): T {
  method to (line 213) | to<T>(object: Record<string, any>): T {

FILE: packages/adapter-fauna/test/index.test.ts
  method session (line 27) | async session(sessionToken) {
  method account (line 33) | async account({ provider, providerAccountId }) {
  method verificationToken (line 39) | async verificationToken({ identifier, token }) {
  method session (line 71) | async session(sessionToken) {
  method account (line 77) | async account({ provider, providerAccountId }) {
  method verificationToken (line 83) | async verificationToken({ identifier, token }) {

FILE: packages/adapter-firebase/src/index.ts
  type FirebaseAdapterConfig (line 36) | interface FirebaseAdapterConfig extends AppOptions {
  function FirestoreAdapter (line 76) | function FirestoreAdapter(
  constant MAP_TO_FIRESTORE (line 252) | const MAP_TO_FIRESTORE: Record<string, string | undefined> = {
  constant MAP_FROM_FIRESTORE (line 258) | const MAP_FROM_FIRESTORE: Record<string, string | undefined> = {}
  function mapFieldsFactory (line 267) | function mapFieldsFactory(preferSnakeCase?: boolean) {
  function getConverter (line 277) | function getConverter<Document extends Record<string, any>>(options: {
  function getOneDoc (line 324) | async function getOneDoc<T>(
  function deleteDocs (line 331) | async function deleteDocs<T>(
  function getDoc (line 341) | async function getDoc<T>(
  function collectionsFactory (line 349) | function collectionsFactory(
  function initFirestore (line 390) | function initFirestore(

FILE: packages/adapter-hasura/hasura/migrations/default/1666885939998_init_nextauth_models/up.sql
  type accounts (line 1) | CREATE TABLE accounts (
  type sessions (line 16) | CREATE TABLE sessions (
  type users (line 23) | CREATE TABLE users (
  type verification_tokens (line 31) | CREATE TABLE verification_tokens (
  type provider_type (line 37) | CREATE TABLE provider_type (

FILE: packages/adapter-hasura/src/index.ts
  function HasuraAdapter (line 45) | function HasuraAdapter(client: HasuraAdapterClient): Adapter {
  method from (line 178) | from<T, B extends boolean = false>(
  method to (line 194) | to<T>(object: Record<string, any>): T {

FILE: packages/adapter-hasura/src/lib/client.ts
  type HasuraAdapterClient (line 3) | interface HasuraAdapterClient {
  class HasuraClientError (line 13) | class HasuraClientError extends Error {
    method constructor (line 15) | constructor(
  function client (line 25) | function client({ adminSecret, endpoint }: HasuraAdapterClient) {

FILE: packages/adapter-hasura/test/index.test.ts
  method connect (line 28) | async connect() {
  method disconnect (line 31) | async disconnect() {
  method user (line 34) | async user(id) {
  method account (line 39) | async account(params) {
  method session (line 44) | async session(sessionToken) {
  method verificationToken (line 51) | async verificationToken(params) {

FILE: packages/adapter-kysely/src/index.ts
  type Database (line 28) | interface Database {
  method from (line 36) | from<T>(object?: Record<string, any>): T {
  method to (line 45) | to<T>(object: Record<string, any>): T {
  function KyselyAdapter (line 53) | function KyselyAdapter(db: Kysely<Database>): Adapter {
  class KyselyAuth (line 209) | class KyselyAuth<DB extends T, T = Database> extends Kysely<DB> {}
  type Codegen (line 211) | type Codegen = {

FILE: packages/adapter-kysely/test/index.test.ts
  function createTableWithId (line 17) | function createTableWithId(
  method connect (line 74) | async connect() {
  method disconnect (line 163) | async disconnect() {
  method user (line 166) | async user(userId) {
  method account (line 176) | async account({ provider, providerAccountId }) {
  method session (line 189) | async session(sessionToken) {
  method verificationToken (line 199) | async verificationToken({ identifier, token }) {

FILE: packages/adapter-mikro-orm/src/index.ts
  function MikroOrmAdapter (line 31) | function MikroOrmAdapter<

FILE: packages/adapter-mikro-orm/src/lib/entities.ts
  type RemoveIndex (line 19) | type RemoveIndex<T> = {
  class User (line 25) | class User implements RemoveIndex<AdapterUser> {
  class Session (line 60) | class Session implements AdapterSession {
  class Account (line 85) | class Account implements RemoveIndex<AdapterAccount> {
  class VerificationToken (line 133) | class VerificationToken implements AdapterVerificationToken {

FILE: packages/adapter-mikro-orm/test/entities.test.ts
  class User (line 19) | class User implements defaultEntities.User {
  class VeryImportantEntity (line 60) | class VeryImportantEntity {
  function getORM (line 86) | async function getORM() {
  method connect (line 96) | async connect() {
  method disconnect (line 101) | async disconnect() {
  method verificationToken (line 110) | async verificationToken(identifier_token) {
  method user (line 118) | async user(id) {
  method account (line 124) | async account(provider_providerAccountId) {
  method session (line 132) | async session(sessionToken) {

FILE: packages/adapter-mongodb/src/index.ts
  type MongoDBAdapterOptions (line 39) | interface MongoDBAdapterOptions {
  method from (line 73) | from<T = Record<string, unknown>>(object: Record<string, any>): T {
  method to (line 88) | to<T = Record<string, unknown>>(object: Record<string, any>) {
  function _id (line 103) | function _id(hex?: string) {
  function MongoDBAdapter (line 108) | function MongoDBAdapter(

FILE: packages/adapter-mongodb/test/custom.test.ts
  method disconnect (line 14) | async disconnect() {
  method user (line 18) | async user(id) {
  method account (line 27) | async account(provider_providerAccountId) {
  method session (line 35) | async session(sessionToken) {
  method verificationToken (line 43) | async verificationToken(identifier_token) {

FILE: packages/adapter-mongodb/test/index.test.ts
  method disconnect (line 11) | async disconnect() {
  method user (line 15) | async user(id) {
  method account (line 24) | async account(provider_providerAccountId) {
  method session (line 32) | async session(sessionToken) {
  method verificationToken (line 40) | async verificationToken(identifier_token) {

FILE: packages/adapter-mongodb/test/serverless.test.ts
  method disconnect (line 29) | async disconnect() {
  method user (line 33) | async user(id) {
  method account (line 42) | async account(provider_providerAccountId) {
  method session (line 50) | async session(sessionToken) {
  method verificationToken (line 58) | async verificationToken(identifier_token) {

FILE: packages/adapter-neo4j/src/index.ts
  type Neo4jOptions (line 23) | interface Neo4jOptions extends Session {}
  function Neo4jAdapter (line 25) | function Neo4jAdapter(session: Session): Adapter {
  method to (line 187) | to(object: Record<string, any>) {
  method from (line 197) | from<T = Record<string, unknown>>(object?: Record<string, any>): T | null {
  function client (line 216) | function client(session: Session) {

FILE: packages/adapter-neo4j/test/index.test.ts
  method connect (line 17) | async connect() {
  method disconnect (line 23) | async disconnect() {
  method user (line 34) | async user(id) {
  method session (line 41) | async session(sessionToken: string) {
  method account (line 57) | async account(provider_providerAccountId) {
  method verificationToken (line 74) | async verificationToken(identifier_token) {

FILE: packages/adapter-neon/schema.sql
  type accounts (line 12) | CREATE TABLE accounts
  type sessions (line 30) | CREATE TABLE sessions
  type users (line 40) | CREATE TABLE users

FILE: packages/adapter-neon/src/index.ts
  function NeonAdapter (line 26) | function NeonAdapter(client: Pool): Adapter {

FILE: packages/adapter-neon/test/index.test.ts
  constant POOL_SIZE (line 18) | const POOL_SIZE = 20
  method verificationToken (line 54) | async verificationToken(identifier_token) {

FILE: packages/adapter-pg/schema.sql
  type accounts (line 12) | CREATE TABLE accounts
  type sessions (line 30) | CREATE TABLE sessions
  type users (line 40) | CREATE TABLE users

FILE: packages/adapter-pg/src/index.ts
  function mapExpiresAt (line 26) | function mapExpiresAt(account: any): any {
  function PostgresAdapter (line 34) | function PostgresAdapter(client: Pool): Adapter {

FILE: packages/adapter-pg/test/index.test.ts
  constant POOL_SIZE (line 5) | const POOL_SIZE = 20
  method verificationToken (line 41) | async verificationToken(identifier_token) {

FILE: packages/adapter-pouchdb/src/index.ts
  type PrefixConfig (line 26) | type PrefixConfig = Record<
  type IndexConfig (line 30) | type IndexConfig = Record<
  type PouchDBAdapterOptions (line 41) | interface PouchDBAdapterOptions {
  function PouchDBAdapter (line 85) | function PouchDBAdapter(options: PouchDBAdapterOptions): Adapter {
  function createIndexes (line 302) | async function createIndexes(
  function toAdapter (line 345) | function toAdapter<T>(
  function toAdapterUser (line 361) | function toAdapterUser(
  function toAdapterSession (line 370) | function toAdapterSession(
  function toAdapterAccount (line 379) | function toAdapterAccount(
  function toVerificationToken (line 386) | function toVerificationToken(

FILE: packages/adapter-pouchdb/test/index.test.ts
  method connect (line 40) | async connect() {
  method verificationToken (line 80) | async verificationToken({ identifier, token }) {

FILE: packages/adapter-prisma/src/index.ts
  function PrismaAdapter (line 26) | function PrismaAdapter(
  function stripUndefined (line 129) | function stripUndefined<T>(obj: T) {

FILE: packages/adapter-prisma/test/index.test.ts
  method id (line 13) | id() {
  method verificationToken (line 41) | async verificationToken(identifier_token) {

FILE: packages/adapter-sequelize/src/index.ts
  type AccountInstance (line 31) | interface AccountInstance
  type UserInstance (line 34) | interface UserInstance
  type SessionInstance (line 37) | interface SessionInstance
  type VerificationTokenInstance (line 40) | interface VerificationTokenInstance
  type SequelizeAdapterOptions (line 45) | interface SequelizeAdapterOptions {
  function SequelizeAdapter (line 61) | function SequelizeAdapter(

FILE: packages/adapter-supabase/src/index.ts
  function format (line 26) | function format<T>(obj: Record<string, any>): T {
  type SupabaseAdapterOptions (line 43) | interface SupabaseAdapterOptions {
  function SupabaseAdapter (line 54) | function SupabaseAdapter(options: SupabaseAdapterOptions): Adapter {
  type Database (line 234) | interface Database {

FILE: packages/adapter-supabase/supabase/migrations/20221108043803_create_next_auth_schema.sql
  type next_auth (line 60) | CREATE TABLE IF NOT EXISTS  next_auth.accounts

FILE: packages/adapter-supabase/supabase/migrations/20221108044627_create_public_users_table.sql
  type users (line 5) | create table users (
  function public (line 23) | create function public.handle_new_user()

FILE: packages/adapter-supabase/test/index.test.ts
  method session (line 23) | async session(sessionToken) {
  method user (line 35) | async user(id) {
  method account (line 47) | async account({ provider, providerAccountId }) {
  method verificationToken (line 59) | async verificationToken({ identifier, token }) {

FILE: packages/adapter-surrealdb/src/index.ts
  type Document (line 28) | type Document<T = RecordId<string>> = {
  type UserDoc (line 32) | type UserDoc = Document<RecordId<"user">> & {
  type AccountDoc (line 36) | type AccountDoc<T = RecordId<"user">> = Document<RecordId<"account">> & {
  type SessionDoc (line 45) | type SessionDoc<T = RecordId<"user">> = Document<RecordId<"session">> & {
  type VerificationTokenDoc (line 50) | type VerificationTokenDoc = Document<RecordId<"verification_token">> & {
  type AuthenticatorDoc (line 55) | type AuthenticatorDoc<T = RecordId<"user">> = Document<
  function removeUndefinedFields (line 165) | function removeUndefinedFields<T>(obj: T): Partial<T | null> {
  function SurrealDBAdapter (line 179) | function SurrealDBAdapter(

FILE: packages/adapter-surrealdb/test/common.ts
  method id (line 24) | id() {
  method user (line 69) | async user(id: string) {
  method account (line 79) | async account({ provider, providerAccountId }) {
  method session (line 89) | async session(sessionToken: string) {
  method verificationToken (line 99) | async verificationToken({ identifier, token }) {
  method authenticator (line 115) | async authenticator(credentialID: string) {

FILE: packages/adapter-typeorm/src/entities.ts
  class UserEntity (line 22) | class UserEntity {
  class AccountEntity (line 46) | class AccountEntity {
  class SessionEntity (line 94) | class SessionEntity {
  class VerificationTokenEntity (line 112) | class VerificationTokenEntity {

FILE: packages/adapter-typeorm/src/index.ts
  type Entities (line 30) | type Entities = typeof entities
  type TypeORMAdapterOptions (line 33) | interface TypeORMAdapterOptions {
  function getManager (line 42) | async function getManager(options: {
  function TypeORMAdapter (line 67) | function TypeORMAdapter(

FILE: packages/adapter-typeorm/src/utils.ts
  function parseDataSourceConfig (line 5) | function parseDataSourceConfig(
  function entitiesChanged (line 78) | function entitiesChanged(
  function updateConnectionEntities (line 91) | async function updateConnectionEntities(

FILE: packages/adapter-typeorm/test/custom-entities.ts
  class UserEntity (line 22) | class UserEntity {
  class AccountEntity (line 52) | class AccountEntity {
  class SessionEntity (line 100) | class SessionEntity {
  class VerificationTokenEntity (line 118) | class VerificationTokenEntity {

FILE: packages/adapter-typeorm/test/helpers.ts
  function db (line 13) | function db(

FILE: packages/adapter-unstorage/src/index.ts
  type UnstorageAdapterOptions (line 29) | interface UnstorageAdapterOptions {
  function hydrateDates (line 92) | function hydrateDates(json: Record<string, any>) {
  function UnstorageAdapter (line 99) | function UnstorageAdapter(

FILE: packages/adapter-unstorage/test/filesystem.test.ts
  method user (line 15) | async user(id: string) {
  method account (line 22) | async account({ provider, providerAccountId }) {
  method session (line 29) | async session(sessionToken) {
  method verificationToken (line 36) | async verificationToken(where) {
  method authenticator (line 43) | async authenticator(id) {

FILE: packages/adapter-unstorage/test/memory.test.ts
  method user (line 12) | async user(id: string) {
  method account (line 19) | async account({ provider, providerAccountId }) {
  method session (line 26) | async session(sessionToken) {
  method verificationToken (line 33) | async verificationToken(where) {
  method authenticator (line 40) | async authenticator(id) {

FILE: packages/adapter-unstorage/test/redis-json.test.ts
  method hasItem (line 24) | async hasItem(key, _opts) {
  method getItem (line 27) | async getItem(key, _opts) {
  method getItemRaw (line 31) | async getItemRaw(key, _opts) {
  method setItem (line 35) | async setItem(key, value, _opts) {
  method setItemRaw (line 44) | async setItemRaw(key, value, _opts) {
  method removeItem (line 49) | async removeItem(key, _opts) {
  method getKeys (line 52) | async getKeys(base, _opts) {
  method user (line 73) | async user(id: string) {
  method account (line 80) | async account({ provider, providerAccountId }) {
  method session (line 87) | async session(sessionToken) {
  method verificationToken (line 94) | async verificationToken(where) {
  method authenticator (line 101) | async authenticator(id) {

FILE: packages/adapter-unstorage/test/redis.test.ts
  method user (line 17) | async user(id: string) {
  method account (line 24) | async account({ provider, providerAccountId }) {
  method session (line 31) | async session(sessionToken) {
  method verificationToken (line 38) | async verificationToken(where) {
  method authenticator (line 45) | async authenticator(id) {

FILE: packages/adapter-upstash-redis/src/index.ts
  type UpstashRedisAdapterOptions (line 28) | interface UpstashRedisAdapterOptions {
  function hydrateDates (line 74) | function hydrateDates(json: object) {
  function UpstashRedisAdapter (line 81) | function UpstashRedisAdapter(

FILE: packages/adapter-upstash-redis/test/index.test.ts
  method user (line 15) | async user(id: string) {
  method account (line 20) | async account({ provider, providerAccountId }) {
  method session (line 27) | async session(sessionToken) {
  method verificationToken (line 34) | async verificationToken(where) {

FILE: packages/adapter-xata/src/index.ts
  function XataAdapter (line 35) | function XataAdapter(client: XataClient): Adapter {

FILE: packages/adapter-xata/src/xata.ts
  type NextauthUser (line 14) | interface NextauthUser {
  type NextauthUserRecord (line 21) | type NextauthUserRecord = NextauthUser & XataRecord
  type NextauthAccount (line 23) | interface NextauthAccount {
  type NextauthAccountRecord (line 37) | type NextauthAccountRecord = NextauthAccount & XataRecord
  type NextauthVerificationToken (line 39) | interface NextauthVerificationToken {
  type NextauthVerificationTokenRecord (line 45) | type NextauthVerificationTokenRecord = NextauthVerificationToken &
  type NextauthUsersAccount (line 48) | interface NextauthUsersAccount {
  type NextauthUsersAccountRecord (line 53) | type NextauthUsersAccountRecord = NextauthUsersAccount & XataRecord
  type NextauthUsersSession (line 55) | interface NextauthUsersSession {
  type NextauthUsersSessionRecord (line 60) | type NextauthUsersSessionRecord = NextauthUsersSession & XataRecord
  type NextauthSession (line 62) | interface NextauthSession {
  type NextauthSessionRecord (line 68) | type NextauthSessionRecord = NextauthSession & XataRecord
  type DatabaseSchema (line 70) | type DatabaseSchema = {
  class XataClient (line 232) | class XataClient extends DatabaseClient<DatabaseSchema> {
    method constructor (line 233) | constructor(options?: BaseClientOptions) {

FILE: packages/adapter-xata/test/index.test.ts
  method user (line 13) | async user(id: string) {
  method account (line 18) | async account({ provider, providerAccountId }) {
  method session (line 25) | async session(sessionToken) {
  method verificationToken (line 32) | async verificationToken(where) {

FILE: packages/core/src/adapters.ts
  type AdapterUser (line 176) | interface AdapterUser extends User {
  type AdapterAccountType (line 191) | type AdapterAccountType = Extract<
  type AdapterAccount (line 205) | interface AdapterAccount extends Account {
  type AdapterSession (line 213) | interface AdapterSession {
  type VerificationToken (line 244) | interface VerificationToken {
  type AdapterAuthenticator (line 258) | interface AdapterAuthenticator extends Authenticator {
  type Adapter (line 282) | interface Adapter {
  function isDate (line 445) | function isDate(value: unknown): value is string {
  type JsonObject (line 455) | type JsonObject = {
  type JsonArray (line 458) | type JsonArray = JsonValue[]
  type JsonPrimitive (line 459) | type JsonPrimitive = string | number | boolean | null
  type JsonValue (line 460) | type JsonValue = JsonPrimitive | JsonObject | JsonArray
  type AdapterAccount (line 461) | interface AdapterAccount {

FILE: packages/core/src/errors.ts
  type ErrorOptions (line 1) | type ErrorOptions = Error | Record<string, unknown>
  type ErrorType (line 3) | type ErrorType =
  class AuthError (line 43) | class AuthError extends Error {
    method constructor (line 55) | constructor(
  class SignInError (line 87) | class SignInError extends AuthError {
  class AdapterError (line 106) | class AdapterError extends AuthError {
  class AccessDenied (line 115) | class AccessDenied extends AuthError {
  class CallbackRouteError (line 159) | class CallbackRouteError extends AuthError {
  class ErrorPageLoop (line 172) | class ErrorPageLoop extends AuthError {
  class EventError (line 185) | class EventError extends AuthError {
  class InvalidCallbackUrl (line 200) | class InvalidCallbackUrl extends AuthError {
  class CredentialsSignin (line 211) | class CredentialsSignin extends SignInError {
  class InvalidEndpoints (line 234) | class InvalidEndpoints extends AuthError {
  class InvalidCheck (line 245) | class InvalidCheck extends AuthError {
  class JWTSessionError (line 261) | class JWTSessionError extends AuthError {
  class MissingAdapter (line 273) | class MissingAdapter extends AuthError {
  class MissingAdapterMethods (line 285) | class MissingAdapterMethods extends AuthError {
  class MissingAuthorize (line 296) | class MissingAuthorize extends AuthError {
  class MissingSecret (line 314) | class MissingSecret extends AuthError {
  class OAuthAccountNotLinked (line 331) | class OAuthAccountNotLinked extends SignInError {
  class OAuthCallbackError (line 342) | class OAuthCallbackError extends SignInError {
  class OAuthProfileParseError (line 352) | class OAuthProfileParseError extends AuthError {
  class SessionTokenError (line 364) | class SessionTokenError extends AuthError {
  class OAuthSignInError (line 384) | class OAuthSignInError extends SignInError {
  class EmailSignInError (line 399) | class EmailSignInError extends SignInError {
  class SignOutError (line 413) | class SignOutError extends AuthError {
  class UnknownAction (line 423) | class UnknownAction extends AuthError {
  class UnsupportedStrategy (line 433) | class UnsupportedStrategy extends AuthError {
  class InvalidProvider (line 441) | class InvalidProvider extends AuthError {
  class UntrustedHost (line 457) | class UntrustedHost extends AuthError {
  class Verification (line 467) | class Verification extends AuthError {
  class MissingCSRF (line 482) | class MissingCSRF extends SignInError {
  function isClientError (line 503) | function isClientError(error: Error): error is AuthError {
  class DuplicateConditionalUI (line 512) | class DuplicateConditionalUI extends AuthError {
  class MissingWebAuthnAutocomplete (line 522) | class MissingWebAuthnAutocomplete extends AuthError {
  class WebAuthnVerificationError (line 530) | class WebAuthnVerificationError extends AuthError {
  class AccountNotLinked (line 541) | class AccountNotLinked extends SignInError {
  class ExperimentalFeatureNotEnabled (line 549) | class ExperimentalFeatureNotEnabled extends AuthError {

FILE: packages/core/src/index.ts
  function Auth (line 101) | async function Auth(
  type AuthConfig (line 216) | interface AuthConfig {

FILE: packages/core/src/jwt.ts
  constant DEFAULT_MAX_AGE (line 48) | const DEFAULT_MAX_AGE = 30 * 24 * 60 * 60 // 30 days
  type Digest (line 54) | type Digest = Parameters<typeof calculateJwkThumbprint>[1]
  function encode (line 57) | async function encode<Payload = JWT>(params: JWTEncodeParams<Payload>) {
  function decode (line 76) | async function decode<Payload = JWT>(
  type GetTokenParamsBase (line 111) | type GetTokenParamsBase = {
  type GetTokenParams (line 116) | interface GetTokenParams<R extends boolean = false>
  function getToken (line 144) | async function getToken(
  function getDerivedEncryptionKey (line 192) | async function getDerivedEncryptionKey(
  type DefaultJWT (line 217) | interface DefaultJWT extends Record<string, unknown> {
  type JWT (line 232) | interface JWT extends Record<string, unknown>, DefaultJWT {}
  type JWTEncodeParams (line 234) | interface JWTEncodeParams<Payload = JWT> {
  type JWTDecodeParams (line 249) | interface JWTDecodeParams {
  type JWTOptions (line 265) | interface JWTOptions {

FILE: packages/core/src/lib/actions/callback/handle-login.ts
  function handleLoginOrRegister (line 26) | async function handleLoginOrRegister(

FILE: packages/core/src/lib/actions/callback/index.ts
  function callback (line 33) | async function callback(
  function handleAuthorized (line 539) | async function handleAuthorized(

FILE: packages/core/src/lib/actions/callback/oauth/callback.ts
  function formUrlEncode (line 23) | function formUrlEncode(token: string) {
  function clientSecretBasic (line 31) | function clientSecretBasic(clientId: string, clientSecret: string) {
  function handleOAuth (line 47) | async function handleOAuth(
  function getUserAndAccount (line 308) | async function getUserAndAccount(

FILE: packages/core/src/lib/actions/callback/oauth/checks.ts
  type CookiePayload (line 16) | interface CookiePayload {
  constant COOKIE_TTL (line 20) | const COOKIE_TTL = 60 * 15 // 15 minutes
  function sealCookie (line 23) | async function sealCookie(
  function parseCookie (line 50) | async function parseCookie(
  function clearCookie (line 74) | function clearCookie(
  function useCookie (line 89) | function useCookie(
  method create (line 114) | async create(options: InternalOptions<"oauth">) {
  type EncodedState (line 128) | interface EncodedState {
  constant STATE_MAX_AGE (line 133) | const STATE_MAX_AGE = 60 * 15 // 15 minutes in seconds
  method create (line 142) | async create(options: InternalOptions<"oauth">, origin?: string) {
  method decode (line 175) | async decode(state: string, options: InternalOptions) {
  method create (line 192) | async create(options: InternalOptions<"oidc">) {
  constant WEBAUTHN_CHALLENGE_MAX_AGE (line 208) | const WEBAUTHN_CHALLENGE_MAX_AGE = 60 * 15 // 15 minutes in seconds
  type WebAuthnChallengePayload (line 210) | interface WebAuthnChallengePayload {
  method create (line 217) | async create(
  method use (line 236) | async use(

FILE: packages/core/src/lib/actions/callback/oauth/csrf-token.ts
  type CreateCSRFTokenParams (line 5) | interface CreateCSRFTokenParams {
  function createCSRFToken (line 26) | async function createCSRFToken({
  function validateCSRF (line 57) | function validateCSRF(action: AuthAction, verified?: boolean) {

FILE: packages/core/src/lib/actions/session.ts
  function session (line 9) | async function session(

FILE: packages/core/src/lib/actions/signin/authorization-url.ts
  function getAuthorizationUrl (line 13) | async function getAuthorizationUrl(

FILE: packages/core/src/lib/actions/signin/index.ts
  function signIn (line 11) | async function signIn(

FILE: packages/core/src/lib/actions/signin/send-token.ts
  function sendToken (line 12) | async function sendToken(
  function defaultNormalizer (line 94) | function defaultNormalizer(email?: string) {

FILE: packages/core/src/lib/actions/signout.ts
  function signOut (line 13) | async function signOut(

FILE: packages/core/src/lib/actions/webauthn-options.ts
  function webAuthnOptions (line 20) | async function webAuthnOptions(

FILE: packages/core/src/lib/index.ts
  function AuthInternal (line 15) | async function AuthInternal(

FILE: packages/core/src/lib/init.ts
  type InitParams (line 14) | interface InitParams {
  method signIn (line 30) | signIn() {
  method redirect (line 33) | redirect({ url, baseUrl }) {
  method session (line 38) | session({ session }) {
  method jwt (line 48) | jwt({ token }) {
  function init (line 54) | async function init({
  type Method (line 191) | type Method = (...args: any[]) => Promise<any>
  function eventsErrorHandler (line 194) | function eventsErrorHandler(
  function adapterErrorHandler (line 212) | function adapterErrorHandler(

FILE: packages/core/src/lib/pages/error.tsx
  type ErrorProps (line 9) | interface ErrorProps {
  type ErrorView (line 15) | interface ErrorView {
  function ErrorPage (line 23) | function ErrorPage(props: ErrorProps) {

FILE: packages/core/src/lib/pages/index.ts
  function send (line 18) | function send({
  type RenderPageParams (line 38) | type RenderPageParams = {
  function renderPage (line 52) | function renderPage(params: RenderPageParams) {

FILE: packages/core/src/lib/pages/signin.tsx
  function ConditionalUIScript (line 24) | function ConditionalUIScript(providerID: string) {
  function SigninPage (line 37) | function SigninPage(props: {

FILE: packages/core/src/lib/pages/signout.tsx
  type SignoutProps (line 3) | interface SignoutProps {
  function SignoutPage (line 9) | function SignoutPage(props: SignoutProps) {

FILE: packages/core/src/lib/pages/verify-request.tsx
  type VerifyRequestPageProps (line 3) | interface VerifyRequestPageProps {
  function VerifyRequestPage (line 8) | function VerifyRequestPage(props: VerifyRequestPageProps) {

FILE: packages/core/src/lib/utils/actions.ts
  function isAuthAction (line 15) | function isAuthAction(action: string): action is AuthAction {

FILE: packages/core/src/lib/utils/assert.ts
  type ConfigError (line 22) | type ConfigError =
  function isValidHttpUrl (line 33) | function isValidHttpUrl(url: string, baseUrl: string) {
  function isSemverString (line 43) | function isSemverString(version: string): version is SemverString {
  function assertConfig (line 87) | function assertConfig(

FILE: packages/core/src/lib/utils/callback-url.ts
  type CreateCallbackUrlParams (line 3) | interface CreateCallbackUrlParams {
  function createCallbackUrl (line 14) | async function createCallbackUrl({

FILE: packages/core/src/lib/utils/cookie.ts
  constant ALLOWED_COOKIE_SIZE (line 26) | const ALLOWED_COOKIE_SIZE = 4096
  constant ESTIMATED_EMPTY_COOKIE_SIZE (line 28) | const ESTIMATED_EMPTY_COOKIE_SIZE = 160
  constant CHUNK_SIZE (line 29) | const CHUNK_SIZE = ALLOWED_COOKIE_SIZE - ESTIMATED_EMPTY_COOKIE_SIZE
  type JWTString (line 34) | type JWTString = string
  type SetCookieOptions (line 36) | type SetCookieOptions = Partial<CookieOption["options"]> & {
  type SessionToken (line 45) | type SessionToken<T extends "jwt" | "database" = "jwt"> = T extends "jwt"
  function defaultCookies (line 59) | function defaultCookies(useSecureCookies: boolean) {
  type Cookie (line 134) | interface Cookie extends CookieOption {
  type Chunks (line 138) | type Chunks = Record<string, string>
  class SessionStore (line 140) | class SessionStore {
    method constructor (line 145) | constructor(
    method value (line 166) | get value() {
    method #chunk (line 180) | #chunk(cookie: Cookie): Cookie[] {
    method #clean (line 207) | #clean(): Record<string, Cookie> {
    method chunk (line 225) | chunk(value: string, options: Partial<Cookie["options"]>): Cookie[] {
    method clean (line 245) | clean(): Cookie[] {

FILE: packages/core/src/lib/utils/date.ts
  function fromDate (line 6) | function fromDate(time: number, date = Date.now()) {

FILE: packages/core/src/lib/utils/email.ts
  function html (line 11) | function html(params: { url: string; host: string; theme: Theme }) {
  function text (line 63) | function text({ url, host }: { url: string; host: string }) {

FILE: packages/core/src/lib/utils/env.ts
  function setEnvDefaults (line 9) | function setEnvDefaults(
  function createActionURL (line 73) | function createActionURL(

FILE: packages/core/src/lib/utils/logger.ts
  type LoggerInstance (line 11) | interface LoggerInstance extends Record<string, Function> {
  method error (line 23) | error(error) {
  method warn (line 43) | warn(code) {
  method debug (line 47) | debug(message, metadata) {
  function setLogger (line 59) | function setLogger(

FILE: packages/core/src/lib/utils/merge.ts
  function isObject (line 1) | function isObject(item: unknown): item is object {
  function merge (line 6) | function merge<T extends Record<string, unknown>>(

FILE: packages/core/src/lib/utils/providers.ts
  function parseProviders (line 19) | function parseProviders(params: {
  function normalizeOAuth (line 78) | function normalizeOAuth(
  function stripUndefined (line 146) | function stripUndefined<T extends object>(o: T): T {
  function normalizeEndpoint (line 154) | function normalizeEndpoint(
  function isOIDCProvider (line 186) | function isOIDCProvider(
  function isOAuth2Provider (line 192) | function isOAuth2Provider(
  function isOAuthProvider (line 199) | function isOAuthProvider(

FILE: packages/core/src/lib/utils/session.ts
  function getLoggedInUser (line 7) | async function getLoggedInUser(

FILE: packages/core/src/lib/utils/web.ts
  function getBody (line 15) | async function getBody(req: Request): Promise<Record<string, any> | unde...
  function toInternalRequest (line 27) | async function toInternalRequest(
  function toRequest (line 63) | function toRequest(request: RequestInternal): Request {
  function toResponse (line 74) | function toResponse(res: ResponseInternal): Response {
  function createHash (line 100) | async function createHash(message: string) {
  function randomString (line 110) | function randomString(size: number) {
  function parseActionAndProviderId (line 118) | function parseActionAndProviderId(

FILE: packages/core/src/lib/utils/webauthn-client.js
  function webauthnScript (line 24) | async function webauthnScript(authURL, providerID) {

FILE: packages/core/src/lib/utils/webauthn-utils.ts
  type WebAuthnRegister (line 38) | type WebAuthnRegister = "register"
  type WebAuthnAuthenticate (line 39) | type WebAuthnAuthenticate = "authenticate"
  type WebAuthnAction (line 40) | type WebAuthnAction = WebAuthnRegister | WebAuthnAuthenticate
  type InternalOptionsWebAuthn (line 42) | type InternalOptionsWebAuthn = InternalOptions<WebAuthnProviderType> & {
  type WebAuthnOptionsResponseBody (line 45) | type WebAuthnOptionsResponseBody =
  type WebAuthnOptionsResponse (line 54) | type WebAuthnOptionsResponse = ResponseInternal & {
  type CredentialDeviceType (line 58) | type CredentialDeviceType = "singleDevice" | "multiDevice"
  type InternalAuthenticator (line 59) | interface InternalAuthenticator {
  type RGetUserInfo (line 69) | type RGetUserInfo = Awaited<ReturnType<GetUserInfo>>
  function inferWebAuthnOptions (line 80) | function inferWebAuthnOptions(
  function getRegistrationResponse (line 139) | async function getRegistrationResponse(
  function getAuthenticationResponse (line 176) | async function getAuthenticationResponse(
  function verifyAuthenticate (line 203) | async function verifyAuthenticate(
  function verifyRegister (line 320) | async function verifyRegister(
  function getAuthenticationOptions (line 411) | async function getAuthenticationOptions(
  function getRegistrationOptions (line 446) | async function getRegistrationOptions(
  function assertInternalOptionsWebAuthn (line 482) | function assertInternalOptionsWebAuthn(
  function fromAdapterAuthenticator (line 498) | function fromAdapterAuthenticator(
  function fromBase64 (line 511) | function fromBase64(base64: string): Uint8Array {
  function toBase64 (line 515) | function toBase64(bytes: Uint8Array): string {
  function transportsToString (line 519) | function transportsToString(
  function stringToTransports (line 525) | function stringToTransports(

FILE: packages/core/src/lib/vendored/cookie.ts
  type ParseOptions (line 83) | interface ParseOptions {
  function parse (line 104) | function parse(
  function startIndex (line 148) | function startIndex(str: string, index: number, max: number) {
  function endIndex (line 156) | function endIndex(str: string, index: number, min: number) {
  type SerializeOptions (line 167) | interface SerializeOptions {
  function serialize (line 254) | function serialize(
  function decode (line 368) | function decode(str: string): string {
  function isDate (line 381) | function isDate(val: any): val is Date {

FILE: packages/core/src/providers/42-school.ts
  type UserData (line 13) | interface UserData {
  type CursusUser (line 38) | interface CursusUser {
  type ProjectUser (line 54) | interface ProjectUser {
  type Achievement (line 75) | interface Achievement {
  type LanguagesUser (line 87) | interface LanguagesUser {
  type TitlesUser (line 95) | interface TitlesUser {
  type ExpertisesUser (line 104) | interface ExpertisesUser {
  type Campus (line 114) | interface Campus {
  type CampusUser (line 139) | interface CampusUser {
  type Image (line 148) | interface Image {
  type FortyTwoProfile (line 158) | interface FortyTwoProfile extends UserData, Record<string, any> {
  function FortyTwo (line 233) | function FortyTwo<P extends FortyTwoProfile>(

FILE: packages/core/src/providers/apple.ts
  type AppleProfile (line 18) | interface AppleProfile extends Record<string, any> {
  type AppleNonConformUser (line 106) | interface AppleNonConformUser {
  function Apple (line 160) | function Apple(

FILE: packages/core/src/providers/asgardeo.ts
  type AsgardeoProfile (line 17) | interface AsgardeoProfile extends Record<string, any> {
  function Asgardeo (line 104) | function Asgardeo(

FILE: packages/core/src/providers/atlassian.ts
  type AtlassianProfile (line 16) | interface AtlassianProfile extends Record<string, any> {
  function Atlassian (line 95) | function Atlassian(

FILE: packages/core/src/providers/auth0.ts
  type Auth0Profile (line 16) | interface Auth0Profile extends Record<string, any> {
  function Auth0 (line 117) | function Auth0(

FILE: packages/core/src/providers/authentik.ts
  type AuthentikProfile (line 13) | interface AuthentikProfile extends Record<string, any> {
  function Authentik (line 91) | function Authentik<P extends AuthentikProfile>(

FILE: packages/core/src/providers/azure-ad-b2c.ts
  type AzureADB2CProfile (line 15) | interface AzureADB2CProfile {
  function AzureADB2C (line 106) | function AzureADB2C(

FILE: packages/core/src/providers/azure-ad.ts
  type AzureADProfile (line 15) | type AzureADProfile = MicrosoftEntraIDProfile
  function AzureAD (line 22) | function AzureAD(

FILE: packages/core/src/providers/azure-devops.ts
  type AzureDevOpsProfile (line 4) | interface AzureDevOpsProfile extends Record<string, any> {
  function AzureDevOpsProvider (line 117) | function AzureDevOpsProvider<P extends AzureDevOpsProfile>(

FILE: packages/core/src/providers/bankid-no.ts
  type BankIDNorwayProfile (line 19) | interface BankIDNorwayProfile {
  function BankIDNorway (line 135) | function BankIDNorway(

FILE: packages/core/src/providers/battlenet.ts
  type BattleNetProfile (line 13) | interface BattleNetProfile extends Record<string, any> {
  type BattleNetIssuer (line 19) | type BattleNetIssuer =
  function BattleNet (line 89) | function BattleNet<P extends BattleNetProfile>(

FILE: packages/core/src/providers/beyondidentity.ts
  type BeyondIdentityProfile (line 15) | interface BeyondIdentityProfile {
  function BeyondIdentity (line 80) | function BeyondIdentity(

FILE: packages/core/src/providers/bitbucket.ts
  type LiteralUnion (line 14) | type LiteralUnion<T extends U, U = string> = T | (U & Record<never, never>)
  type BitbucketProfile (line 19) | interface BitbucketProfile {
  function Bitbucket (line 94) | function Bitbucket(

FILE: packages/core/src/providers/box.ts
  function Box (line 63) | function Box(

FILE: packages/core/src/providers/boxyhq-saml.ts
  type BoxyHQSAMLProfile (line 13) | interface BoxyHQSAMLProfile extends Record<string, any> {
  function SAMLJackson (line 122) | function SAMLJackson<P extends BoxyHQSAMLProfile>(

FILE: packages/core/src/providers/bungie.ts
  function Bungie (line 167) | function Bungie(

FILE: packages/core/src/providers/click-up.ts
  type ClickUpProfile (line 15) | interface ClickUpProfile {
  function ClickUp (line 77) | function ClickUp(

FILE: packages/core/src/providers/cognito.ts
  type CognitoProfile (line 13) | interface CognitoProfile extends Record<string, any> {
  function Cognito (line 82) | function Cognito<P extends CognitoProfile>(

FILE: packages/core/src/providers/coinbase.ts
  function Coinbase (line 69) | function Coinbase(

FILE: packages/core/src/providers/concept2.ts
  type Concept2Profile (line 14) | interface Concept2Profile extends Record<string, any> {
  function Concept2 (line 83) | function Concept2(

FILE: packages/core/src/providers/credentials.ts
  type CredentialInput (line 10) | interface CredentialInput
  type CredentialsConfig (line 16) | interface CredentialsConfig<
  type CredentialsProviderId (line 77) | type CredentialsProviderId = "credentials"
  function Credentials (line 142) | function Credentials<

FILE: packages/core/src/providers/descope.ts
  type DescopeProfile (line 19) | interface DescopeProfile {
  function Descope (line 93) | function Descope(

FILE: packages/core/src/providers/discord.ts
  type DiscordProfile (line 17) | interface DiscordProfile extends Record<string, any> {
  function Discord (line 142) | function Discord<P extends DiscordProfile>(

FILE: packages/core/src/providers/dribbble.ts
  type DribbbleProfile (line 13) | interface DribbbleProfile extends Record<string, any> {
  function Dribbble (line 80) | function Dribbble<P extends DribbbleProfile>(

FILE: packages/core/src/providers/dropbox.ts
  function Dropbox (line 65) | function Dropbox(

FILE: packages/core/src/providers/duende-identity-server6.ts
  type DuendeISUser (line 13) | interface DuendeISUser extends Record<string, any> {
  function DuendeIdentityServer6 (line 92) | function DuendeIdentityServer6<P extends DuendeISUser>(

FILE: packages/core/src/providers/email.ts
  function Email (line 18) | function Email(config: NodemailerUserConfig): NodemailerConfig {
  type EmailProviderType (line 28) | type EmailProviderType = "email"
  type EmailProviderSendVerificationRequestParams (line 30) | type EmailProviderSendVerificationRequestParams = {
  type EmailConfig (line 40) | interface EmailConfig extends CommonProviderOptions {
  type EmailUserConfig (line 60) | type EmailUserConfig = Omit<Partial<EmailConfig>, "options" | "type">

FILE: packages/core/src/providers/eventbrite.ts
  type EventbriteProfile (line 17) | interface EventbriteProfile extends Record<string, any> {
  function Eventbrite (line 76) | function Eventbrite<P extends EventbriteProfile>(

FILE: packages/core/src/providers/eveonline.ts
  type EVEOnlineProfile (line 13) | interface EVEOnlineProfile extends Record<string, any> {
  function EVEOnline (line 95) | function EVEOnline<P extends EVEOnlineProfile>(

FILE: packages/core/src/providers/facebook.ts
  type FacebookPictureData (line 13) | interface FacebookPictureData {
  type FacebookPicture (line 17) | interface FacebookPicture {
  type FacebookProfile (line 20) | interface FacebookProfile extends Record<string, any> {
  function Facebook (line 85) | function Facebook<P extends FacebookProfile>(

FILE: packages/core/src/providers/faceit.ts
  function FACEIT (line 64) | function FACEIT(

FILE: packages/core/src/providers/figma.ts
  type FigmaProfile (line 16) | interface FigmaProfile {
  function Figma (line 75) | function Figma(

FILE: packages/core/src/providers/forwardemail.ts
  function ForwardEmail (line 5) | function ForwardEmail(config: EmailUserConfig): EmailConfig {

FILE: packages/core/src/providers/foursquare.ts
  function Foursquare (line 69) | function Foursquare(

FILE: packages/core/src/providers/freshbooks.ts
  function Freshbooks (line 66) | function Freshbooks(

FILE: packages/core/src/providers/frontegg.ts
  type FronteggProfile (line 17) | interface FronteggProfile {
  function Frontegg (line 97) | function Frontegg(

FILE: packages/core/src/providers/fusionauth.ts
  type FusionAuthProfile (line 17) | interface FusionAuthProfile extends Record<string, any> {
  function FusionAuth (line 278) | function FusionAuth<P extends FusionAuthProfile>(

FILE: packages/core/src/providers/github.ts
  type GitHubEmail (line 14) | interface GitHubEmail {
  type GitHubProfile (line 22) | interface GitHubProfile {
  function GitHub (line 124) | function GitHub(

FILE: packages/core/src/providers/gitlab.ts
  type GitLabProfile (line 13) | interface GitLabProfile extends Record<string, any> {
  function GitLab (line 111) | function GitLab<P extends GitLabProfile>(

FILE: packages/core/src/providers/google.ts
  type GoogleProfile (line 13) | interface GoogleProfile extends Record<string, any> {
  function Google (line 139) | function Google<P extends GoogleProfile>(

FILE: packages/core/src/providers/hubspot.ts
  type HubSpotProfile (line 13) | interface HubSpotProfile extends Record<string, any> {
  function HubSpot (line 77) | function HubSpot<P extends HubSpotProfile>(

FILE: packages/core/src/providers/huggingface.ts
  type HuggingfaceProfile (line 14) | interface HuggingfaceProfile {
  function Huggingface (line 218) | function Huggingface(

FILE: packages/core/src/providers/identity-server4.ts
  function IdentityServer4 (line 69) | function IdentityServer4(

FILE: packages/core/src/providers/index.ts
  type ProviderType (line 26) | type ProviderType =
  type CommonProviderOptions (line 34) | interface CommonProviderOptions {
  type InternalProviderOptions (line 50) | interface InternalProviderOptions {
  type Provider (line 68) | type Provider<P extends Profile = any> = (
  type BuiltInProviders (line 90) | type BuiltInProviders = Record<
  type AppProviders (line 101) | type AppProviders = Array<
  type AppProvider (line 105) | interface AppProvider extends CommonProviderOptions {
  type ProviderId (line 110) | type ProviderId =

FILE: packages/core/src/providers/instagram.ts
  function Instagram (line 74) | function Instagram(

FILE: packages/core/src/providers/kakao.ts
  type DateTime (line 13) | type DateTime = string
  type Gender (line 14) | type Gender = "female" | "male"
  type Birthday (line 15) | type Birthday = "SOLAR" | "LUNAR"
  type AgeRange (line 16) | type AgeRange =
  type KakaoProfile (line 33) | interface KakaoProfile extends Record<string, any> {
  function Kakao (line 161) | function Kakao<P extends KakaoProfile>(

FILE: packages/core/src/providers/keycloak.ts
  type KeycloakProfile (line 13) | interface KeycloakProfile extends Record<string, any> {
  function Keycloak (line 101) | function Keycloak<P extends KeycloakProfile>(

FILE: packages/core/src/providers/kinde.ts
  type KindeProfile (line 16) | interface KindeProfile extends Record<string, any> {
  function Kinde (line 74) | function Kinde(

FILE: packages/core/src/providers/line.ts
  type LineProfile (line 13) | interface LineProfile extends Record<string, any> {
  function LINE (line 84) | function LINE<P extends LineProfile>(

FILE: packages/core/src/providers/linkedin.ts
  type LinkedInProfile (line 14) | interface LinkedInProfile extends Record<string, any> {
  function LinkedIn (line 78) | function LinkedIn<P extends LinkedInProfile>(

FILE: packages/core/src/providers/logto.ts
  type LogtoProfile (line 17) | interface LogtoProfile {
  function Logto (line 100) | function Logto(

FILE: packages/core/src/providers/loops.ts
  type LoopsUserConfig (line 14) | type LoopsUserConfig = Omit<Partial<LoopsConfig>, "options" | "type">
  type LoopsConfig (line 16) | interface LoopsConfig
  type Params (line 25) | type Params = Parameters<EmailConfig["sendVerificationRequest"]>[0] & {
  function Loops (line 45) | function Loops(config: LoopsUserConfig): LoopsConfig {

FILE: packages/core/src/providers/mailchimp.ts
  function Mailchimp (line 66) | function Mailchimp(

FILE: packages/core/src/providers/mailgun.ts
  function MailGun (line 49) | function MailGun(

FILE: packages/core/src/providers/mailru.ts
  function Mailru (line 63) | function Mailru(

FILE: packages/core/src/providers/mastodon.ts
  type MastodonProfile (line 13) | interface MastodonProfile extends Record<string, any> {
  function Mastodon (line 90) | function Mastodon<P extends MastodonProfile>(

FILE: packages/core/src/providers/mattermost.ts
  type MattermostProfile (line 14) | interface MattermostProfile {
  function Mattermost (line 130) | function Mattermost<P extends MattermostProfile>(

FILE: packages/core/src/providers/medium.ts
  function Medium (line 69) | function Medium(

FILE: packages/core/src/providers/microsoft-entra-id.ts
  type MicrosoftEntraIDProfile (line 18) | interface MicrosoftEntraIDProfile {
  function MicrosoftEntraID (line 433) | function MicrosoftEntraID(

FILE: packages/core/src/providers/naver.ts
  type NaverProfile (line 15) | interface NaverProfile extends Record<string, any> {
  function Naver (line 82) | function Naver<P extends NaverProfile>(

FILE: packages/core/src/providers/netlify.ts
  function Netlify (line 67) | function Netlify(

FILE: packages/core/src/providers/netsuite.ts
  type OAuthNetSuiteOptions (line 19) | interface OAuthNetSuiteOptions {
  type NetSuiteProfile (line 49) | interface NetSuiteProfile {
  function NetSuite (line 198) | function NetSuite<P extends NetSuiteProfile>(

FILE: packages/core/src/providers/nextcloud.ts
  type NextcloudProfile (line 18) | interface NextcloudProfile extends Record<string, any> {
  function Nextcloud (line 168) | function Nextcloud(

FILE: packages/core/src/providers/nodemailer.ts
  type AllTransportOptions (line 15) | type AllTransportOptions =
  type NodemailerConfig (line 32) | interface NodemailerConfig extends EmailConfig {
  type NodemailerUserConfig (line 46) | type NodemailerUserConfig = Omit<
  function Nodemailer (line 51) | function Nodemailer(

FILE: packages/core/src/providers/notion.ts
  type Person (line 14) | interface Person extends Record<string, any> {
  type User (line 19) | interface User extends Record<string, any> {
  type Owner (line 33) | interface Owner {
  type NotionProfile (line 40) | interface NotionProfile extends Record<string, any> {
  type AdditionalConfig (line 52) | interface AdditionalConfig {
  constant NOTION_HOST (line 56) | const NOTION_HOST = "https://api.notion.com"
  constant NOTION_API_VERSION (line 57) | const NOTION_API_VERSION = "2022-06-28"
  function NotionProvider (line 112) | function NotionProvider<P extends NotionProfile>(

FILE: packages/core/src/providers/oauth.ts
  type AuthorizationParameters (line 8) | type AuthorizationParameters = any
  type CallbackParamsType (line 9) | type CallbackParamsType = any
  type IssuerMetadata (line 10) | type IssuerMetadata = any
  type OAuthCallbackChecks (line 11) | type OAuthCallbackChecks = any
  type OpenIDCallbackChecks (line 12) | type OpenIDCallbackChecks = any
  type OAuthChecks (line 16) | type OAuthChecks = OpenIDCallbackChecks | OAuthCallbackChecks
  type PartialIssuer (line 18) | type PartialIssuer = Partial<Pick<IssuerMetadata, "jwks_endpoint" | "iss...
  type UrlParams (line 20) | type UrlParams = Record<string, unknown>
  type EndpointRequest (line 22) | type EndpointRequest<C, R, P> = (
  type AdvancedEndpointHandler (line 33) | interface AdvancedEndpointHandler<P extends UrlParams, C, R> {
  type EndpointHandler (line 56) | type EndpointHandler<
  type AuthorizationEndpointHandler (line 62) | type AuthorizationEndpointHandler =
  type TokenEndpointHandler (line 65) | type TokenEndpointHandler = EndpointHandler<
  type UserinfoEndpointHandler (line 84) | type UserinfoEndpointHandler = EndpointHandler<
  type ProfileCallback (line 90) | type ProfileCallback<Profile> = (
  type AccountCallback (line 95) | type AccountCallback = (tokens: TokenSet) => TokenSet | undefined | void
  type OAuthProviderButtonStyles (line 97) | interface OAuthProviderButtonStyles {
  type OAuth2Config (line 111) | interface OAuth2Config<Profile>
  type OIDCConfig (line 244) | interface OIDCConfig<Profile>
  type OAuthConfig (line 255) | type OAuthConfig<Profile> = OIDCConfig<Profile> | OAuth2Config<Profile>
  type OAuthEndpointType (line 257) | type OAuthEndpointType = "authorization" | "token" | "userinfo"
  type OAuthConfigInternal (line 264) | type OAuthConfigInternal<Profile> = Omit<
  type OIDCConfigInternal (line 297) | type OIDCConfigInternal<Profile> = OAuthConfigInternal<Profile> & {
  type OAuthUserConfig (line 302) | type OAuthUserConfig<Profile> = Omit<
  type OIDCUserConfig (line 307) | type OIDCUserConfig<Profile> = Omit<

FILE: packages/core/src/providers/okta.ts
  type OktaProfile (line 13) | interface OktaProfile extends Record<string, any> {
  function Okta (line 100) | function Okta<P extends OktaProfile>(

FILE: packages/core/src/providers/onelogin.ts
  function OneLogin (line 65) | function OneLogin(

FILE: packages/core/src/providers/ory-hydra.ts
  type OryHydraProfile (line 13) | interface OryHydraProfile extends Record<string, any> {
  function OryHydra (line 80) | function OryHydra<P extends OryHydraProfile>(

FILE: packages/core/src/providers/osso.ts
  function Osso (line 79) | function Osso(

FILE: packages/core/src/providers/osu.ts
  type OsuUserCompact (line 13) | interface OsuUserCompact {
  type OsuProfile (line 29) | interface OsuProfile extends OsuUserCompact, Record<string, any> {
  function Osu (line 118) | function Osu<P extends OsuProfile>(

FILE: packages/core/src/providers/passage.ts
  type PassageProfile (line 15) | interface PassageProfile {
  function Passage (line 90) | function Passage(

FILE: packages/core/src/providers/passkey.ts
  function Passkey (line 69) | function Passkey(

FILE: packages/core/src/providers/patreon.ts
  type PatreonProfile (line 13) | interface PatreonProfile extends Record<string, any> {
  function Patreon (line 74) | function Patreon<P extends PatreonProfile>(

FILE: packages/core/src/providers/ping-id.ts
  type PingProfile (line 3) | interface PingProfile extends Record<string, any> {
  function PingId (line 59) | function PingId(

FILE: packages/core/src/providers/pinterest.ts
  type PinterestProfile (line 13) | interface PinterestProfile extends Record<string, any> {
  function PinterestProvider (line 80) | function PinterestProvider<P extends PinterestProfile>(

FILE: packages/core/src/providers/pipedrive.ts
  type PipedriveProfile (line 13) | interface PipedriveProfile extends Record<string, any> {
  function Pipedrive (line 100) | function Pipedrive<P extends PipedriveProfile>(

FILE: packages/core/src/providers/postmark.ts
  function Postmark (line 5) | function Postmark(config: EmailUserConfig): EmailConfig {

FILE: packages/core/src/providers/reddit.ts
  function Reddit (line 88) | function Reddit(

FILE: packages/core/src/providers/resend.ts
  function Resend (line 5) | function Resend(config: EmailUserConfig): EmailConfig {

FILE: packages/core/src/providers/roblox.ts
  type RobloxProfile (line 17) | interface RobloxProfile extends Record<string, any> {
  function Roblox (line 81) | function Roblox(

FILE: packages/core/src/providers/salesforce.ts
  type SalesforceProfile (line 13) | interface SalesforceProfile extends Record<string, any> {
  function Salesforce (line 60) | function Salesforce(

FILE: packages/core/src/providers/sendgrid.ts
  function SendGrid (line 5) | function SendGrid(config: EmailUserConfig): EmailConfig {

FILE: packages/core/src/providers/simplelogin.ts
  type SimpleLoginProfile (line 13) | interface SimpleLoginProfile {
  function SimpleLogin (line 88) | function SimpleLogin<P extends SimpleLoginProfile>(

FILE: packages/core/src/providers/slack.ts
  type SlackProfile (line 13) | interface SlackProfile extends Record<string, any> {
  function Slack (line 103) | function Slack<P extends SlackProfile>(

FILE: packages/core/src/providers/spotify.ts
  type SpotifyImage (line 13) | interface SpotifyImage {
  type SpotifyProfile (line 17) | interface SpotifyProfile extends Record<string, any> {
  function Spotify (line 77) | function Spotify<P extends SpotifyProfile>(

FILE: packages/core/src/providers/strava.ts
  type StravaProfile (line 13) | interface StravaProfile extends Record<string, any> {
  function Strava (line 69) | function Strava<P extends StravaProfile>(

FILE: packages/core/src/providers/threads.ts
  type ThreadsProfile (line 16) | interface ThreadsProfile {
  function Threads (line 109) | function Threads(

FILE: packages/core/src/providers/tiktok.ts
  type TiktokProfile (line 17) | interface TiktokProfile {
  function TikTok (line 260) | function TikTok(

FILE: packages/core/src/providers/todoist.ts
  type TodoistProfile (line 16) | interface TodoistProfile extends Record<string, any> {
  function TodoistProvider (line 76) | function TodoistProvider<P extends TodoistProfile>(

FILE: packages/core/src/providers/trakt.ts
  type TraktUser (line 13) | interface TraktUser extends Record<string, any> {
  function Trakt (line 88) | function Trakt<P extends TraktUser>(

FILE: packages/core/src/providers/twitch.ts
  type TwitchProfile (line 13) | interface TwitchProfile extends Record<string, any> {
  function Twitch (line 72) | function Twitch(

FILE: packages/core/src/providers/twitter.ts
  type TwitterProfile (line 16) | interface TwitterProfile {
  function Twitter (line 184) | function Twitter(

FILE: packages/core/src/providers/united-effects.ts
  type UnitedEffectsProfile (line 12) | interface UnitedEffectsProfile extends Record<string, any> {
  function UnitedEffects (line 77) | function UnitedEffects<P extends UnitedEffectsProfile>(

FILE: packages/core/src/providers/vipps.ts
  type Address (line 3) | interface Address {
  type VippsProfile (line 13) | interface VippsProfile extends Record<string, any> {
  function Vipps (line 72) | function Vipps(

FILE: packages/core/src/providers/vk.ts
  type VkProfile (line 14) | interface VkProfile {
  function VK (line 361) | function VK<P extends Record<string, any> = VkProfile>(

FILE: packages/core/src/providers/webauthn.ts
  type WebAuthnProviderType (line 24) | type WebAuthnProviderType = "webauthn"
  constant DEFAULT_WEBAUTHN_TIMEOUT (line 26) | const DEFAULT_WEBAUTHN_TIMEOUT = 5 * 60 * 1000 // 5 minutes
  constant DEFAULT_SIMPLEWEBAUTHN_BROWSER_VERSION (line 27) | const DEFAULT_SIMPLEWEBAUTHN_BROWSER_VERSION: SemverString = "v9.0.1"
  type RelayingParty (line 29) | type RelayingParty = {
  type RelayingPartyArray (line 38) | type RelayingPartyArray = {
  type GetUserInfo (line 47) | type GetUserInfo = (
  type ConfigurableAuthenticationOptions (line 56) | type ConfigurableAuthenticationOptions = Omit<
  type ConfigurableRegistrationOptions (line 60) | type ConfigurableRegistrationOptions = Omit<
  type ConfigurableVerifyAuthenticationOptions (line 70) | type ConfigurableVerifyAuthenticationOptions = Omit<
  type ConfigurableVerifyRegistrationOptions (line 78) | type ConfigurableVerifyRegistrationOptions = Omit<
  type WebAuthnConfig (line 83) | interface WebAuthnConfig extends CommonProviderOptions {
  function WebAuthn (line 198) | function WebAuthn(
  function getRelayingParty (line 267) | function getRelayingParty(

FILE: packages/core/src/providers/webex.ts
  type WebexProfile (line 20) | interface WebexProfile extends Record<string, any> {
  function Webex (line 77) | function Webex<P extends WebexProfile>(

FILE: packages/core/src/providers/wechat.ts
  type WeChatProfile (line 14) | interface WeChatProfile {
  function WeChat (line 78) | function WeChat(

FILE: packages/core/src/providers/wikimedia.ts
  type WikimediaGroup (line 13) | type WikimediaGroup =
  type WikimediaGrant (line 36) | type WikimediaGrant =
  type WikimediaRight (line 65) | type WikimediaRight =
  type WikimediaProfile (line 152) | interface WikimediaProfile extends Record<string, any> {
  function Wikimedia (line 236) | function Wikimedia<P extends WikimediaProfile>(

FILE: packages/core/src/providers/wordpress.ts
  function WordPress (line 65) | function WordPress(

FILE: packages/core/src/providers/workos.ts
  type WorkOSProfile (line 15) | interface WorkOSProfile extends Record<string, any> {
  function WorkOS (line 152) | function WorkOS<P extends WorkOSProfile>(

FILE: packages/core/src/providers/yandex.ts
  type YandexProfile (line 22) | interface YandexProfile {
  function Yandex (line 130) | function Yandex(

FILE: packages/core/src/providers/zitadel.ts
  type ZitadelProfile (line 18) | interface ZitadelProfile extends Record<string, any> {
  function ZITADEL (line 119) | function ZITADEL<P extends ZitadelProfile>(

FILE: packages/core/src/providers/zoho.ts
  function Zoho (line 63) | function Zoho(

FILE: packages/core/src/providers/zoom.ts
  type ZoomProfile (line 17) | interface ZoomProfile extends Record<string, any> {
  function Zoom (line 95) | function Zoom(

FILE: packages/core/src/types.ts
  type Awaitable (line 77) | type Awaitable<T> = T | PromiseLike<T>
  type Awaited (line 78) | type Awaited<T> = T extends Promise<infer U> ? U : T
  type SemverString (line 80) | type SemverString =
  type Theme (line 91) | interface Theme {
  type TokenSet (line 103) | type TokenSet = Partial<TokenEndpointResponse> & {
  type Account (line 117) | interface Account extends Partial<TokenEndpointResponse> {
  type Profile (line 153) | interface Profile {
  type CookieOption (line 185) | interface CookieOption {
  type CookiesOptions (line 191) | interface CookiesOptions {
  type ErrorPageParam (line 202) | type ErrorPageParam = "Configuration" | "AccessDenied" | "Verification"
  type SignInPageErrorParam (line 205) | type SignInPageErrorParam =
  type PagesOptions (line 217) | interface PagesOptions {
  type ISODateString (line 242) | type ISODateString = string
  type DefaultSession (line 244) | interface DefaultSession {
  type Session (line 250) | interface Session extends DefaultSession {}
  type DefaultUser (line 252) | interface DefaultUser {
  type User (line 264) | interface User extends DefaultUser {}
  type InternalProvider (line 269) | type InternalProvider<T = ProviderType> = (T extends "oauth"
  type PublicProvider (line 285) | interface PublicProvider {
  type AuthAction (line 322) | type AuthAction =
  type RequestInternal (line 334) | interface RequestInternal {
  type ResponseInternal (line 347) | interface ResponseInternal<
  type Authenticator (line 364) | interface Authenticator {
  type InternalOptions (line 400) | interface InternalOptions<TProviderType = ProviderType> {

FILE: packages/core/src/warnings.ts
  type WarningCode (line 16) | type WarningCode =

FILE: packages/core/test/actions/callback.test.ts
  method authorize (line 166) | authorize() {
  method authorize (line 192) | authorize() {
  class CustomSigninError (line 207) | class CustomSigninError extends CredentialsSignin {
  method authorize (line 221) | authorize() {

FILE: packages/core/test/authorize.test.ts
  function signIn (line 15) | async function signIn(config: Partial<AuthConfig> = {}) {
  method signIn (line 61) | signIn() {

FILE: packages/core/test/fixtures/pages.ts
  method request (line 34) | async request() {

FILE: packages/core/test/memory-adapter.ts
  type Memory (line 16) | type Memory = {
  function initMemory (line 27) | function initMemory(): Memory {
  function MemoryAdapter (line 36) | function MemoryAdapter(memory?: Memory): Adapter {
  function makeid (line 208) | function makeid(length: number) {
  function asBase64 (line 223) | function asBase64(buffer: Uint8Array): string {

FILE: packages/core/test/utils.ts
  constant AUTH_SECRET (line 8) | const AUTH_SECRET = "secret"
  constant SESSION_COOKIE_NAME (line 9) | const SESSION_COOKIE_NAME = "__Secure-authjs.session-token"
  constant CSRF_COOKIE_NAME (line 10) | const CSRF_COOKIE_NAME = "__Host-authjs.csrf-token"
  function TestAdapter (line 12) | function TestAdapter(): Adapter {
  function testConfig (line 54) | function testConfig(overrides?: Partial<AuthConfig>): AuthConfig {
  function makeAuthRequest (line 67) | async function makeAuthRequest(params: {

FILE: packages/core/test/webauthn-utils.test.ts
  function getMockOptions (line 61) | function getMockOptions(
  function createAuthenticator (line 88) | function createAuthenticator(
  function getExpectedResponse (line 105) | function getExpectedResponse(
  function prepareVerifyTest (line 132) | function prepareVerifyTest(

FILE: packages/frameworks-express/src/index.ts
  type ExpressAuthConfig (line 157) | type ExpressAuthConfig = Omit<AuthConfig, "raw">
  function ExpressAuth (line 159) | function ExpressAuth(config: ExpressAuthConfig) {
  type GetSessionResult (line 178) | type GetSessionResult = Promise<Session | null>
  function getSession (line 180) | async function getSession(
  function getBasePath (line 208) | function getBasePath(req: e.Request) {

FILE: packages/frameworks-express/src/lib/http-api-adapters.ts
  function encodeUrlEncoded (line 6) | function encodeUrlEncoded(object: Record<string, any> = {}) {
  function encodeJson (line 23) | function encodeJson(obj: Record<string, any>) {
  function encodeRequestBody (line 30) | function encodeRequestBody(req: ExpressRequest) {
  function toWebRequest (line 47) | function toWebRequest(req: ExpressRequest) {
  function toExpressResponse (line 79) | async function toExpressResponse(

FILE: packages/frameworks-express/test/http-api-adapters/request.test.ts
  function expectMatchingRequestHeaders (line 7) | function expectMatchingRequestHeaders(req: ExpressRequest, request: Requ...
  function expectMatchingJsonRequestBody (line 13) | async function expectMatchingJsonRequestBody(
  function expectMatchingUrlEncodedRequestBody (line 21) | async function expectMatchingUrlEncodedRequestBody(

FILE: packages/frameworks-express/test/http-api-adapters/response.test.ts
  function expectMatchingResponseHeaders (line 6) | function expectMatchingResponseHeaders(

FILE: packages/frameworks-express/test/login.test.ts
  method authorize (line 14) | async authorize(credentials) {

FILE: packages/frameworks-express/test/routing.test.ts
  method authorize (line 28) | async authorize(credentials) {

FILE: packages/frameworks-qwik/src/index.ts
  type QwikAuthConfig (line 145) | interface QwikAuthConfig extends Omit<AuthConfig, "raw"> {}
  type GetSessionResult (line 147) | type GetSessionResult = Promise<{ data: Session | null; cookie: any }>
  function QwikAuthQrl (line 150) | function QwikAuthQrl(
  function authAction (line 266) | async function authAction(
  function getSessionData (line 321) | async function getSessionData(

FILE: packages/frameworks-solid-start/src/client.ts
  type SignInOptions (line 3) | interface SignInOptions<Redirect extends boolean = true>
  type SignInResponse (line 22) | interface SignInResponse {
  type SignOutParams (line 30) | interface SignOutParams<R extends boolean = true> {
  type SignInAuthorizationParams (line 38) | type SignInAuthorizationParams =
  function signIn (line 73) | async function signIn<Redirect extends boolean = true>(
  function signOut (line 141) | async function signOut(options?: SignOutParams) {

FILE: packages/frameworks-solid-start/src/index.ts
  type SolidAuthConfig (line 32) | interface SolidAuthConfig extends AuthConfig {
  function SolidAuthHandler (line 51) | function SolidAuthHandler(prefix: string, authOptions: SolidAuthConfig) {
  function SolidAuth (line 243) | function SolidAuth(config: SolidAuthConfig) {
  type GetSessionResult (line 262) | type GetSessionResult = Promise<Session | null>
  function getSession (line 264) | async function getSession(

FILE: packages/frameworks-sveltekit/src/lib/actions.ts
  type SignInParams (line 11) | type SignInParams = Parameters<App.Locals["signIn"]>
  function signIn (line 12) | async function signIn(
  type SignOutParams (line 82) | type SignOutParams = Parameters<App.Locals["signOut"]>
  function signOut (line 83) | async function signOut(
  function auth (line 111) | async function auth(

FILE: packages/frameworks-sveltekit/src/lib/client.ts
  type SignInOptions (line 4) | interface SignInOptions<Redirect extends boolean = true>
  type SignInResponse (line 23) | interface SignInResponse {
  type SignOutParams (line 31) | interface SignOutParams<Redirect extends boolean = true> {
  type SignInAuthorizationParams (line 45) | type SignInAuthorizationParams =
  function signIn (line 75) | async function signIn<Redirect extends boolean = true>(
  type SignOutResponse (line 130) | interface SignOutResponse {
  function signOut (line 145) | async function signOut<R extends boolean = true>(

FILE: packages/frameworks-sveltekit/src/lib/env.ts
  function setEnvDefaults (line 6) | function setEnvDefaults(

FILE: packages/frameworks-sveltekit/src/lib/index.ts
  function SvelteKitAuth (line 313) | function SvelteKitAuth(

FILE: packages/frameworks-sveltekit/src/lib/types.ts
  type SvelteKitAuthConfig (line 6) | interface SvelteKitAuthConfig extends Omit<AuthConfig, "raw"> {}
  type Locals (line 11) | interface Locals {
  type PageData (line 50) | interface PageData {

FILE: packages/frameworks-sveltekit/src/lib/webauthn.ts
  function webAuthnOptions (line 23) | async function webAuthnOptions(
  function signIn (line 63) | async function signIn<Redirect extends boolean = true>(

FILE: packages/frameworks-template/src/index.ts
  function FrameworkAuth (line 39) | function FrameworkAuth() {

FILE: packages/next-auth/playwright.config.ts
  constant PORT (line 6) | const PORT = process.env.PORT || 3000

FILE: packages/next-auth/src/index.ts
  type AppRouteHandlers (line 105) | type AppRouteHandlers = Record<
  type NextAuthResult (line 116) | interface NextAuthResult {
  function NextAuth (line 374) | function NextAuth(

FILE: packages/next-auth/src/lib/actions.ts
  type SignInParams (line 11) | type SignInParams = Parameters<NextAuthResult["signIn"]>
  function signIn (line 12) | async function signIn(
  type SignOutParams (line 89) | type SignOutParams = Parameters<NextAuthResult["signOut"]>
  function signOut (line 90) | async function signOut(
  type UpdateParams (line 119) | type UpdateParams = Parameters<NextAuthResult["unstable_update"]>
  function update (line 120) | async function update(

FILE: packages/next-auth/src/lib/client.ts
  class ClientFetchError (line 9) | class ClientFetchError extends AuthError {}
  class ClientSessionError (line 12) | class ClientSessionError extends AuthError {}
  type AuthClientConfig (line 14) | interface AuthClientConfig {
  type UseSessionOptions (line 30) | interface UseSessionOptions<R extends boolean> {
  type ClientSafeProvider (line 36) | interface ClientSafeProvider {
  type SignInOptions (line 45) | interface SignInOptions<Redirect extends boolean = true>
  type SignInResponse (line 64) | interface SignInResponse {
  type SignInAuthorizationParams (line 76) | type SignInAuthorizationParams =
  type SignOutResponse (line 83) | interface SignOutResponse {
  type SignOutParams (line 87) | interface SignOutParams<Redirect extends boolean = true> {
  type SessionProviderProps (line 106) | interface SessionProviderProps {
  function fetchData (line 139) | async function fetchData<T = any>(
  function apiBaseUrl (line 170) | function apiBaseUrl(__NEXTAUTH: AuthClientConfig) {
  function useOnline (line 180) | function useOnline() {
  function now (line 205) | function now() {
  function parseUrl (line 213) | function parseUrl(url?: string): {

FILE: packages/next-auth/src/lib/env.ts
  function reqWithEnvURL (line 7) | function reqWithEnvURL(req: NextRequest): NextRequest {
  function setEnvDefaults (line 22) | function setEnvDefaults(config: NextAuthConfig) {

FILE: packages/next-auth/src/lib/index.ts
  type NextAuthConfig (line 19) | interface NextAuthConfig extends Omit<AuthConfig, "raw"> {
  function getSession (line 62) | async function getSession(headers: Headers, config: NextAuthConfig) {
  type NextAuthRequest (line 99) | interface NextAuthRequest extends NextRequest {
  type NextAuthMiddleware (line 103) | type NextAuthMiddleware = (
  type WithAuthArgs (line 108) | type WithAuthArgs =
  function isReqWrapper (line 116) | function isReqWrapper(arg: any): arg is NextAuthMiddleware | AppRouteHan...
  function initAuth (line 120) | function initAuth(
  function handleAuth (line 232) | async function handleAuth(
  function isSameAuthAction (line 290) | function isSameAuthAction(

FILE: packages/next-auth/src/lib/types.ts
  type AppRouteHandlerFnContext (line 8) | type AppRouteHandlerFnContext = {
  type AppRouteHandlerFn (line 15) | type AppRouteHandlerFn = (
  type AppRouteHandlers (line 27) | type AppRouteHandlers = Record<

FILE: packages/next-auth/src/react.tsx
  function getNewBroadcastChannel (line 73) | function getNewBroadcastChannel() {
  function broadcast (line 90) | function broadcast() {
  type UpdateSession (line 106) | type UpdateSession = (data?: any) => Promise<Session | null>
  type SessionContextValue (line 111) | type SessionContextValue<R extends boolean = false> = R extends true
  function useSession (line 134) | function useSession<R extends boolean>(
  type GetSessionParams (line 175) | interface GetSessionParams {
  function getSession (line 181) | async function getSession(params?: GetSessionParams) {
  function getCsrfToken (line 204) | async function getCsrfToken() {
  function getProviders (line 213) | async function getProviders() {
  function signIn (line 238) | async function signIn<Redirect extends boolean = true>(
  function signOut (line 337) | async function signOut<R extends boolean = true>(
  function SessionProvider (line 382) | function SessionProvider(props: SessionProviderProps) {

FILE: packages/next-auth/src/webauthn.ts
  function webAuthnOptions (line 25) | async function webAuthnOptions(
  function signIn (line 66) | async function signIn<Redirect extends boolean = true>(

FILE: packages/next-auth/test/actions.test.ts
  method sendVerificationRequest (line 52) | sendVerificationRequest() {
  method sendVerificationRequest (line 89) | sendVerificationRequest() {

FILE: packages/next-auth/test/e2e/fixtures/auth.ts
  type AuthFixture (line 1) | type AuthFixture = {
  function createAuthFixture (line 6) | function createAuthFixture(): AuthFixture {

FILE: packages/next-auth/test/e2e/fixtures/webApp.ts
  class WebApp (line 14) | class WebApp {
    method constructor (line 27) | constructor({
    method login (line 51) | async login({
    method getSession (line 80) | async getSession({

FILE: packages/next-auth/test/e2e/helpers/authTest.ts
  type AuthJsWebappFixtures (line 6) | type AuthJsWebappFixtures = {

FILE: packages/next-auth/test/e2e/poms/keycloakLoginPom.ts
  class KeycloakLoginPom (line 4) | class KeycloakLoginPom {
    method constructor (line 11) | constructor({ page, auth }: { page: Page; auth: AuthFixture }) {
    method login (line 20) | async login({
    method isVisible (line 38) | isVisible() {

FILE: packages/utils/adapter.ts
  type TestOptions (line 6) | interface TestOptions {
  function runBasicTests (line 59) | async function runBasicTests(options: TestOptions) {
  function hashToken (line 623) | function hashToken(token: string) {
  constant ONE_WEEK_FROM_NOW (line 629) | const ONE_WEEK_FROM_NOW = new Date(Date.now() + 1000 * 60 * 60 * 24 * 7)
  constant FIFTEEN_MINUTES_FROM_NOW (line 631) | const FIFTEEN_MINUTES_FROM_NOW = new Date(Date.now() + 15 * 60 * 1000)
  constant ONE_MONTH (line 633) | const ONE_MONTH = 1000 * 60 * 60 * 24 * 30
  constant ONE_MONTH_FROM_NOW (line 634) | const ONE_MONTH_FROM_NOW = new Date(Date.now() + ONE_MONTH)
Condensed preview — 1094 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (3,086K chars).
[
  {
    "path": ".dockerignore",
    "chars": 339,
    "preview": "# Files\n/**/*/.env\n/**/*/.env.*\n/**/*/README.md\n/**/*/.git\n/**/*/.github\n/**/*/.gitignore\n/**/*/.dockerignore\n/**/*/.tur"
  },
  {
    "path": ".github/CODEOWNERS",
    "chars": 393,
    "preview": "# Learn how to add code owners here:\n# https://help.github.com/en/articles/about-code-owners\n\n*                     @bal"
  },
  {
    "path": ".github/DISCUSSION_TEMPLATE/ideas.yml",
    "chars": 849,
    "preview": "body:\n  - type: textarea\n    attributes:\n      label: Goals\n      description: Short list of what the feature request ai"
  },
  {
    "path": ".github/DISCUSSION_TEMPLATE/questions.yml",
    "chars": 555,
    "preview": "body:\n  - type: textarea\n    attributes:\n      label: Summary\n      description: What do you need help with?\n    validat"
  },
  {
    "path": ".github/ISSUE_TEMPLATE/1_bug_framework.yml",
    "chars": 3101,
    "preview": "name: Bug report\ndescription: Report an issue so we can improve\nlabels: [triage, bug]\nbody:\n  - type: markdown\n    attri"
  },
  {
    "path": ".github/ISSUE_TEMPLATE/2_bug_provider.yml",
    "chars": 4780,
    "preview": "name: Bug report (Provider)\ndescription: Create a provider-specific report\nlabels: [triage, bug, providers]\nbody:\n  - ty"
  },
  {
    "path": ".github/ISSUE_TEMPLATE/3_bug_adapter.yml",
    "chars": 3832,
    "preview": "name: Bug report (Adapter)\ndescription: Create an adapter-specific report\nlabels: [triage, bug, adapters]\nbody:\n  - type"
  },
  {
    "path": ".github/ISSUE_TEMPLATE/4_documentation.yml",
    "chars": 803,
    "preview": "name: \"Documentation\"\ndescription: Request to update or improve NextAuth.js documentation\nlabels: [\"triage\", \"documentat"
  },
  {
    "path": ".github/ISSUE_TEMPLATE/config.yml",
    "chars": 534,
    "preview": "blank_issues_enabled: false\ncontact_links:\n  - name: Get help from the community (Discord)\n    url: https://discord.auth"
  },
  {
    "path": ".github/PULL_REQUEST_TEMPLATE.md",
    "chars": 1307,
    "preview": "<!--\nThanks for your interest in the project. Bugs filed and PRs submitted are appreciated!\n\nPlease fill out the informa"
  },
  {
    "path": ".github/broken-link-checker/action.yml",
    "chars": 208,
    "preview": "name: \"Broken Link Checker\"\ndescription: \"Recursively checks input URL for broken links\"\noutputs:\n  version:\n    descrip"
  },
  {
    "path": ".github/broken-link-checker/index.d.ts",
    "chars": 38,
    "preview": "declare module \"broken-link-checker\";\n"
  },
  {
    "path": ".github/broken-link-checker/package.json",
    "chars": 735,
    "preview": "{\n  \"name\": \"broken-link-checker\",\n  \"private\": true,\n  \"version\": \"0.2.0\",\n  \"description\": \"Find broken links as a Git"
  },
  {
    "path": ".github/broken-link-checker/src/index.ts",
    "chars": 6100,
    "preview": "import blc from \"broken-link-checker\"\nimport { setFailed } from \"@actions/core\"\nimport * as github from \"@actions/github"
  },
  {
    "path": ".github/broken-link-checker/tsconfig.json",
    "chars": 258,
    "preview": "{\n  \"compilerOptions\": {\n    \"noEmit\": true,\n    \"target\": \"esnext\",\n    \"moduleResolution\": \"node\",\n    \"rootDir\": \"./s"
  },
  {
    "path": ".github/dependabot.yml",
    "chars": 621,
    "preview": "# To get started with Dependabot version updates, you'll need to specify which\n# package ecosystems to update and where "
  },
  {
    "path": ".github/good-first-issue.md",
    "chars": 1082,
    "preview": "This issue was marked with the `good first issue` label by a maintainer.\n\nThis means that it is a good candidate for som"
  },
  {
    "path": ".github/help-needed.md",
    "chars": 1050,
    "preview": "This issue was marked with the `help needed` label by a maintainer.\n\nThe issue might require some digging, so it is reco"
  },
  {
    "path": ".github/invalid-reproduction.md",
    "chars": 3840,
    "preview": "We could not detect a valid reproduction link. **Make sure to follow the bug report template carefully.**\n\n### Why was t"
  },
  {
    "path": ".github/pr-labeler.yml",
    "chars": 1600,
    "preview": "# https://github.com/actions/labeler#create-githublabeleryml\nadapters: [\"packages/core/src/adapters.ts\", \"packages/adapt"
  },
  {
    "path": ".github/stale.yml",
    "chars": 589,
    "preview": "# https://github.com/probot/stale#usage\n\ndaysUntilStale: 60\ndaysUntilClose: 7\nexemptLabels:\n  - pinned\n  - security\n  - "
  },
  {
    "path": ".github/sync.yml",
    "chars": 857,
    "preview": "nextauthjs/express-auth-example:\n  - source: apps/examples/express\n    dest: .\n    deleteOrphaned: true\n  - .github/FUND"
  },
  {
    "path": ".github/version-pr/action.yml",
    "chars": 208,
    "preview": "name: \"Determine version\"\ndescription: \"Determines npm package version based on PR number and commit SHA\"\noutputs:\n  ver"
  },
  {
    "path": ".github/version-pr/index.js",
    "chars": 719,
    "preview": "const fs = require(\"fs\")\nconst path = require(\"path\")\nconst core = require(\"@actions/core\")\n\ntry {\n  const packageJSONPa"
  },
  {
    "path": ".github/workflows/broken-link-checker.yml",
    "chars": 933,
    "preview": "name: \"Broken Link Checker\"\n\non:\n  issue_comment:\n    types: [edited]\n\npermissions:\n  pull-requests: write\n  checks: wri"
  },
  {
    "path": ".github/workflows/codeql-analysis.yml",
    "chars": 577,
    "preview": "name: Code Analysis\n\non:\n  push:\n    branches: [beta, next]\n  pull_request:\n    branches: [main]\n  schedule:\n    - cron:"
  },
  {
    "path": ".github/workflows/pr-labeler.yml",
    "chars": 331,
    "preview": "# https://github.com/actions/labeler#create-workflow\n\nname: Label Pull Requests\n\non:\n  pull_request_target:\n\njobs:\n  prs"
  },
  {
    "path": ".github/workflows/release.yml",
    "chars": 8746,
    "preview": "name: Release\n\non:\n  push:\n    branches:\n      - main\n      - beta\n      - next\n      - 3.x\n  pull_request:\n  merge_grou"
  },
  {
    "path": ".github/workflows/sync-examples.yml",
    "chars": 447,
    "preview": "name: Sync Example Repositories\non:\n  push:\n    branches:\n      - main\n  workflow_dispatch:\njobs:\n  sync:\n    runs-on: u"
  },
  {
    "path": ".github/workflows/triage.yml",
    "chars": 843,
    "preview": "name: Triage issue\non:\n  issues:\n    types: [labeled, opened]\n  issue_comment:\n    types: [created]\n\nenv:\n  GITHUB_TOKEN"
  },
  {
    "path": ".gitignore",
    "chars": 2026,
    "preview": "# Misc\n.DS_Store\n.eslintcache\n.env\n.env.local\n.env.development.local\n.env.test.local\n.env.production.local\npackages/*/.n"
  },
  {
    "path": ".nvmrc",
    "chars": 2,
    "preview": "22"
  },
  {
    "path": ".prettierignore",
    "chars": 1152,
    "preview": ".prettierignore\n.cache-loader\n.DS_Store\n.pnpm-debug.log\n.turbo\n.vscode/generated*\n/_work\n/actions-runner\nnode_modules\npa"
  },
  {
    "path": ".vscode/extensions.json",
    "chars": 81,
    "preview": "{\n  \"recommendations\": [\"esbenp.prettier-vscode\", \"bradlc.vscode-tailwindcss\"]\n}\n"
  },
  {
    "path": ".vscode/settings.json",
    "chars": 243,
    "preview": "{\n  \"typescript.tsdk\": \"node_modules/typescript/lib\",\n  \"openInGitHub.remote.branch\": \"main\",\n  \"typescript.preferences."
  },
  {
    "path": ".vscode/snippets.code-snippets",
    "chars": 432,
    "preview": "{\n  \"oauth2-spec\": {\n    \"description\": \"Markdown link to OAuth 2 specification\",\n    \"scope\": \"typescript\",\n    \"prefix"
  },
  {
    "path": "LICENSE",
    "chars": 749,
    "preview": "ISC License\n\nCopyright (c) 2022-2024, Balázs Orbán\n\nPermission to use, copy, modify, and/or distribute this software for"
  },
  {
    "path": "README.md",
    "chars": 4755,
    "preview": "<p align=\"center\">\n  <br/>\n  <a href=\"https://authjs.dev\" target=\"_blank\"><img width=\"96px\" src=\"https://authjs.dev/img/"
  },
  {
    "path": "apps/dev/express/.gitignore",
    "chars": 230,
    "preview": "# API keys and secrets\n.env\n\n# Dependency directory\nnode_modules\n\n# Editors\n.idea\n*.iml\n.vscode/settings.json\n\n# OS meta"
  },
  {
    "path": "apps/dev/express/.prettierignore",
    "chars": 155,
    "preview": "\n.DS_Store\nnode_modules\n/dist\n/.turbo\n/package\n.env\n.env.*\n!.env.example\n\n# Ignore files for PNPM, NPM and YARN\npnpm-loc"
  },
  {
    "path": "apps/dev/express/README.md",
    "chars": 1400,
    "preview": "> The example repository is maintained from a [monorepo](https://github.com/nextauthjs/next-auth/tree/main/apps/examples"
  },
  {
    "path": "apps/dev/express/api/index.js",
    "chars": 56,
    "preview": "import { app } from \"../src/app.js\"\n\nexport default app\n"
  },
  {
    "path": "apps/dev/express/package.json",
    "chars": 956,
    "preview": "{\n  \"name\": \"express-auth-app\",\n  \"description\": \"Express + Auth.js Developer app\",\n  \"type\": \"module\",\n  \"private\": tru"
  },
  {
    "path": "apps/dev/express/public/css/style.css",
    "chars": 61,
    "preview": "@tailwind base;\n\n@tailwind components;\n\n@tailwind utilities;\n"
  },
  {
    "path": "apps/dev/express/src/app.ts",
    "chars": 2057,
    "preview": "import express, { type Request, type Response } from \"express\"\nimport logger from \"morgan\"\nimport { join } from \"node:pa"
  },
  {
    "path": "apps/dev/express/src/config/auth.config.ts",
    "chars": 2203,
    "preview": "import Apple from \"@auth/express/providers/apple\"\nimport Auth0 from \"@auth/express/providers/auth0\"\nimport AzureB2C from"
  },
  {
    "path": "apps/dev/express/src/errors.ts",
    "chars": 315,
    "preview": "export class HttpError extends Error {\n  status: number\n  constructor(status: number, message: string) {\n    super(messa"
  },
  {
    "path": "apps/dev/express/src/middleware/auth.middleware.ts",
    "chars": 666,
    "preview": "import { getSession } from \"@auth/express\"\nimport { authConfig } from \"../config/auth.config.js\"\nimport type { NextFunct"
  },
  {
    "path": "apps/dev/express/src/middleware/error.middleware.ts",
    "chars": 583,
    "preview": "import type { NextFunction, Request, Response } from \"express\"\nimport { HttpError, NotFoundError } from \"../errors.js\"\n\n"
  },
  {
    "path": "apps/dev/express/src/server.ts",
    "chars": 171,
    "preview": "import { app } from \"./app.js\"\n\nconst port = app.get(\"port\")\n\nconst server = app.listen(port, () => {\n  console.log(`Lis"
  },
  {
    "path": "apps/dev/express/tsconfig.json",
    "chars": 344,
    "preview": "{\n  \"compilerOptions\": {\n    \"module\": \"NodeNext\",\n    \"esModuleInterop\": true,\n    \"target\": \"esnext\",\n    \"noImplicitA"
  },
  {
    "path": "apps/dev/express/views/error.pug",
    "chars": 53,
    "preview": "extends layout\n\nblock content\n  h1=title\n  p=message\n"
  },
  {
    "path": "apps/dev/express/views/index.pug",
    "chars": 280,
    "preview": "extends layout\n\nblock content\n  h1=title\n  p\n    | This is an example site to demonstrate how to use #{ ' ' }\n    a(href"
  },
  {
    "path": "apps/dev/express/views/layout.pug",
    "chars": 826,
    "preview": "doctype html\nhtml\n  head\n    title=title\n    meta(name=\"viewport\" content=\"width=device-width, initial-scale=1.0\")\n  bod"
  },
  {
    "path": "apps/dev/express/views/protected.pug",
    "chars": 378,
    "preview": "extends layout\n\nblock content\n  if session\n    h1 Protected page\n    p\n      | This is a protected content. You can acce"
  },
  {
    "path": "apps/dev/nextjs/.gitignore",
    "chars": 88,
    "preview": "node_modules/\n/test-results/\n/playwright-report/\n/playwright/.cache/\ndbschema/edgeql-js\n"
  },
  {
    "path": "apps/dev/nextjs/.vscode/settings.json",
    "chars": 151,
    "preview": "{\n  \"typescript.tsdk\": \"../../../node_modules/.pnpm/typescript@4.9.4/node_modules/typescript/lib\",\n  \"typescript.enableP"
  },
  {
    "path": "apps/dev/nextjs/README.md",
    "chars": 277,
    "preview": "# NextAuth.js Development App\n\nThis folder contains a Next.js app using NextAuth.js for local development. See the follo"
  },
  {
    "path": "apps/dev/nextjs/app/api/protected/route.ts",
    "chars": 248,
    "preview": "import { auth } from \"auth\"\nimport { NextResponse } from \"next/server\"\n\nexport const GET = auth(function GET(req) {\n  if"
  },
  {
    "path": "apps/dev/nextjs/app/auth/[...nextauth]/route.ts",
    "chars": 104,
    "preview": "import { handlers } from \"auth\"\nexport const { GET, POST } = handlers\n\n// export const runtime = \"edge\"\n"
  },
  {
    "path": "apps/dev/nextjs/app/client.tsx",
    "chars": 1373,
    "preview": "\"use client\"\n\nimport { signIn, signOut, useSession } from \"next-auth/react\"\nimport { useRouter } from \"next/navigation\"\n"
  },
  {
    "path": "apps/dev/nextjs/app/dashboard/page.tsx",
    "chars": 77,
    "preview": "export default function Page() {\n  return <h1>This page is protected.</h1>\n}\n"
  },
  {
    "path": "apps/dev/nextjs/app/layout.tsx",
    "chars": 1262,
    "preview": "import { auth, signIn, signOut, unstable_update as update } from \"auth\"\nimport Footer from \"components/footer\"\nimport { "
  },
  {
    "path": "apps/dev/nextjs/app/page.tsx",
    "chars": 1576,
    "preview": "import { auth, unstable_update as update } from \"auth\"\nimport { SessionProvider } from \"next-auth/react\"\nimport Client f"
  },
  {
    "path": "apps/dev/nextjs/app/styles.css",
    "chars": 1938,
    "preview": "body {\n  font-family:\n    ui-sans-serif,\n    system-ui,\n    -apple-system,\n    BlinkMacSystemFont,\n    \"Segoe UI\",\n    R"
  },
  {
    "path": "apps/dev/nextjs/auth.ts",
    "chars": 2132,
    "preview": "import NextAuth from \"next-auth\"\nimport Credentials from \"next-auth/providers/credentials\"\nimport Keycloak from \"next-au"
  },
  {
    "path": "apps/dev/nextjs/components/access-denied.tsx",
    "chars": 376,
    "preview": "import { signIn } from \"next-auth/react\"\n\nexport default function AccessDenied() {\n  return (\n    <>\n      <h1>Access De"
  },
  {
    "path": "apps/dev/nextjs/components/footer.module.css",
    "chars": 760,
    "preview": ".footer {\n  margin: 0;\n  padding: 0 1rem 0 1rem;\n\n  @media screen and (min-width: 960px) {\n    padding: 0;\n  }\n}\n\n.navIt"
  },
  {
    "path": "apps/dev/nextjs/components/footer.tsx",
    "chars": 3368,
    "preview": "import Link from \"next/link\"\nimport styles from \"./footer.module.css\"\nimport packageJSON from \"next-auth/package.json\"\n\n"
  },
  {
    "path": "apps/dev/nextjs/components/header.module.css",
    "chars": 2029,
    "preview": "/* Set min-height to avoid page reflow while session loading */\n.signedInStatus {\n  display: flex;\n  align-items: center"
  },
  {
    "path": "apps/dev/nextjs/components/header.tsx",
    "chars": 1868,
    "preview": "import type { Session } from \"next-auth\"\nimport Link from \"next/link\"\nimport styles from \"./header.module.css\"\n\nexport f"
  },
  {
    "path": "apps/dev/nextjs/middleware.ts",
    "chars": 383,
    "preview": "export { auth as middleware } from \"auth\"\n\n// Or like this if you need to do something here.\n// export default auth((req"
  },
  {
    "path": "apps/dev/nextjs/next-env.d.ts",
    "chars": 277,
    "preview": "/// <reference types=\"next\" />\n/// <reference types=\"next/image-types/global\" />\n/// <reference types=\"next/navigation-t"
  },
  {
    "path": "apps/dev/nextjs/next.config.js",
    "chars": 220,
    "preview": "/** @type {import(\"next\").NextConfig} */\nmodule.exports = {\n  webpack(config) {\n    config.experiments = { ...config.exp"
  },
  {
    "path": "apps/dev/nextjs/package.json",
    "chars": 532,
    "preview": "{\n  \"name\": \"next-auth-app\",\n  \"version\": \"1.0.1\",\n  \"description\": \"Next.js + Auth.js Developer App\",\n  \"private\": true"
  },
  {
    "path": "apps/dev/nextjs/pages/_app.tsx",
    "chars": 862,
    "preview": "import { SessionProvider, signIn, signOut, useSession } from \"next-auth/react\"\nimport \"./styles.css\"\nimport { Header } f"
  },
  {
    "path": "apps/dev/nextjs/pages/api/examples/protected.ts",
    "chars": 384,
    "preview": "import type { NextApiHandler } from \"next\"\n\nimport { auth } from \"../../../auth\"\n\nexport default async function handler("
  },
  {
    "path": "apps/dev/nextjs/pages/api/examples/session.ts",
    "chars": 194,
    "preview": "// This is an example of how to access a session from an API route\nimport { auth } from \"auth\"\n\nexport default async (re"
  },
  {
    "path": "apps/dev/nextjs/pages/client.tsx",
    "chars": 806,
    "preview": "export default function Page() {\n  return (\n    <>\n      <h1>Client Side Rendering</h1>\n      <p>\n        This page uses"
  },
  {
    "path": "apps/dev/nextjs/pages/credentials.tsx",
    "chars": 1875,
    "preview": "import * as React from \"react\"\nimport { signIn, signOut, useSession } from \"next-auth/react\"\nimport { SignInResponse, Si"
  },
  {
    "path": "apps/dev/nextjs/pages/email.tsx",
    "chars": 2241,
    "preview": "// eslint-disable-next-line no-use-before-define\nimport * as React from \"react\"\nimport { signIn, signOut, useSession } f"
  },
  {
    "path": "apps/dev/nextjs/pages/policy.tsx",
    "chars": 1044,
    "preview": "export default function Page() {\n  return (\n    <>\n      <p>\n        This is an example site to demonstrate how to use{\""
  },
  {
    "path": "apps/dev/nextjs/pages/protected-ssr.tsx",
    "chars": 1295,
    "preview": "// This is an example of how to protect content using server rendering\nimport { auth } from \"../auth\"\nimport AccessDenie"
  },
  {
    "path": "apps/dev/nextjs/pages/protected.tsx",
    "chars": 757,
    "preview": "import { useState, useEffect } from \"react\"\nimport { useSession } from \"next-auth/react\"\n\nexport default function Page()"
  },
  {
    "path": "apps/dev/nextjs/pages/styles.css",
    "chars": 635,
    "preview": "body {\n  font-family:\n    ui-sans-serif,\n    system-ui,\n    -apple-system,\n    BlinkMacSystemFont,\n    \"Segoe UI\",\n    R"
  },
  {
    "path": "apps/dev/nextjs/prisma/migrations/20231023165117_/migration.sql",
    "chars": 1603,
    "preview": "-- CreateTable\nCREATE TABLE \"Account\" (\n    \"id\" TEXT NOT NULL PRIMARY KEY,\n    \"userId\" TEXT NOT NULL,\n    \"type\" TEXT "
  },
  {
    "path": "apps/dev/nextjs/prisma/migrations/20240124035029_init/migration.sql",
    "chars": 2094,
    "preview": "-- CreateTable\nCREATE TABLE \"Account\" (\n    \"userId\" TEXT NOT NULL,\n    \"type\" TEXT NOT NULL,\n    \"provider\" TEXT NOT NU"
  },
  {
    "path": "apps/dev/nextjs/prisma/migrations/migration_lock.toml",
    "chars": 122,
    "preview": "# Please do not edit this file manually\n# It should be added in your version-control system (i.e. Git)\nprovider = \"sqlit"
  },
  {
    "path": "apps/dev/nextjs/prisma/schema.prisma",
    "chars": 1564,
    "preview": "datasource db {\n  provider = \"sqlite\"\n  url      = \"file:./dev.db\"\n}\n\ngenerator client {\n  provider = \"prisma-client-js\""
  },
  {
    "path": "apps/dev/nextjs/tests/signin.spec.ts",
    "chars": 1294,
    "preview": "import { test, expect } from \"@playwright/test\"\n\ntest(\"Sign in with Auth0\", async ({ page }) => {\n  // Go to NextAuth ex"
  },
  {
    "path": "apps/dev/nextjs/tsconfig.json",
    "chars": 649,
    "preview": "{\n  \"compilerOptions\": {\n    \"target\": \"esnext\",\n    \"lib\": [\"dom\", \"dom.iterable\", \"esnext\"],\n    \"allowJs\": true,\n    "
  },
  {
    "path": "apps/dev/qwik/.gitignore",
    "chars": 379,
    "preview": "# Build\n/dist\n/lib\n/lib-types\n/server\n\n# Development\nnode_modules\n*.local\n\n# Cache\n.cache\n.mf\n.rollup.cache\ntsconfig.tsb"
  },
  {
    "path": "apps/dev/qwik/README.md",
    "chars": 2434,
    "preview": "# Qwik City App ⚡️\n\n- [Qwik Docs](https://qwik.dev/)\n- [Discord](https://qwik.dev/chat)\n- [Qwik GitHub](https://github.c"
  },
  {
    "path": "apps/dev/qwik/package.json",
    "chars": 1475,
    "preview": "{\n  \"name\": \"qwik-auth-app\",\n  \"description\": \"Qwik + Auth.js Developer app\",\n  \"engines\": {\n    \"node\": \"^18.17.0 || ^2"
  },
  {
    "path": "apps/dev/qwik/public/manifest.json",
    "chars": 258,
    "preview": "{\n  \"$schema\": \"https://json.schemastore.org/web-manifest-combined.json\",\n  \"name\": \"qwik-project-name\",\n  \"short_name\":"
  },
  {
    "path": "apps/dev/qwik/public/robots.txt",
    "chars": 0,
    "preview": ""
  },
  {
    "path": "apps/dev/qwik/qwik.env.d.ts",
    "chars": 221,
    "preview": "// This file can be used to add references for global types like `vite/client`.\n\n// Add global `vite/client` types. For "
  },
  {
    "path": "apps/dev/qwik/src/components/router-head/router-head.tsx",
    "chars": 1197,
    "preview": "import { component$ } from \"@builder.io/qwik\"\nimport { useDocumentHead, useLocation } from \"@builder.io/qwik-city\"\n\n/**\n"
  },
  {
    "path": "apps/dev/qwik/src/entry.dev.tsx",
    "chars": 585,
    "preview": "/*\n * WHAT IS THIS FILE?\n *\n * Development entry point using only client-side modules:\n * - Do not use this mode in prod"
  },
  {
    "path": "apps/dev/qwik/src/entry.preview.tsx",
    "chars": 648,
    "preview": "/*\n * WHAT IS THIS FILE?\n *\n * It's the bundle entry point for `npm run preview`.\n * That is, serving your app built in "
  },
  {
    "path": "apps/dev/qwik/src/entry.ssr.tsx",
    "chars": 761,
    "preview": "/**\n * WHAT IS THIS FILE?\n *\n * SSR entry point, in all cases the application is rendered outside the browser, this\n * e"
  },
  {
    "path": "apps/dev/qwik/src/global.css",
    "chars": 0,
    "preview": ""
  },
  {
    "path": "apps/dev/qwik/src/root.tsx",
    "chars": 789,
    "preview": "import { component$ } from \"@builder.io/qwik\"\nimport {\n  QwikCityProvider,\n  RouterOutlet,\n  ServiceWorkerRegister,\n} fr"
  },
  {
    "path": "apps/dev/qwik/src/routes/index.tsx",
    "chars": 1017,
    "preview": "import { component$ } from \"@builder.io/qwik\"\nimport { Form, type RequestHandler } from \"@builder.io/qwik-city\"\nimport {"
  },
  {
    "path": "apps/dev/qwik/src/routes/layout.tsx",
    "chars": 606,
    "preview": "import { component$, Slot } from \"@builder.io/qwik\"\nimport type { RequestHandler } from \"@builder.io/qwik-city\"\n\nexport "
  },
  {
    "path": "apps/dev/qwik/src/routes/plugin@auth.ts",
    "chars": 347,
    "preview": "import { DefaultSession, QwikAuth$ } from \"@auth/qwik\"\nimport GitHub from \"@auth/qwik/providers/github\"\n\ndeclare module "
  },
  {
    "path": "apps/dev/qwik/src/routes/service-worker.ts",
    "chars": 626,
    "preview": "/*\n * WHAT IS THIS FILE?\n *\n * The service-worker.ts file is used to have state of the art prefetching.\n * https://qwik."
  },
  {
    "path": "apps/dev/qwik/tsconfig.json",
    "chars": 605,
    "preview": "{\n  \"compilerOptions\": {\n    \"allowJs\": true,\n    \"target\": \"ES2017\",\n    \"module\": \"ES2022\",\n    \"lib\": [\"es2022\", \"DOM"
  },
  {
    "path": "apps/dev/qwik/vite.config.ts",
    "chars": 3950,
    "preview": "/**\n * This is the base config for vite.\n * When building, the adapter config is used which loads this file and extends "
  },
  {
    "path": "apps/dev/sveltekit/.env.example",
    "chars": 168,
    "preview": "AUTH_GITHUB_ID=\nAUTH_GITHUB_SECRET=\n# On UNIX systems you can use `openssl rand -hex 32` or \n# https://generate-secret.v"
  },
  {
    "path": "apps/dev/sveltekit/.eslintignore",
    "chars": 160,
    "preview": ".DS_Store\nnode_modules\n/build\n/.svelte-kit\n/package\n.env\n.env.*\n!.env.example\n\n# Ignore files for PNPM, NPM and YARN\npnp"
  },
  {
    "path": "apps/dev/sveltekit/.eslintrc.cjs",
    "chars": 596,
    "preview": "module.exports = {\n  root: true,\n  parser: \"@typescript-eslint/parser\",\n  extends: [\n    \"eslint:recommended\",\n    \"plug"
  },
  {
    "path": "apps/dev/sveltekit/.gitignore",
    "chars": 162,
    "preview": ".DS_Store\nnode_modules\n/build\n/.svelte-kit\n/package\n.env\n.env.*\n!.env.example\n.vercel\n.output\nvite.config.js.timestamp-*"
  },
  {
    "path": "apps/dev/sveltekit/.prettierignore",
    "chars": 160,
    "preview": ".DS_Store\nnode_modules\n/build\n/.svelte-kit\n/package\n.env\n.env.*\n!.env.example\n\n# Ignore files for PNPM, NPM and YARN\npnp"
  },
  {
    "path": "apps/dev/sveltekit/.prettierrc",
    "chars": 138,
    "preview": "{\n  \"semi\": false,\n  \"plugins\": [\"prettier-plugin-svelte\"],\n  \"overrides\": [{ \"files\": \"*.svelte\", \"options\": { \"parser\""
  },
  {
    "path": "apps/dev/sveltekit/README.md",
    "chars": 1429,
    "preview": "> The example repository is maintained from a [monorepo](https://github.com/nextauthjs/next-auth/tree/main/apps/example-"
  },
  {
    "path": "apps/dev/sveltekit/package.json",
    "chars": 769,
    "preview": "{\n  \"name\": \"sveltekit-auth-app\",\n  \"version\": \"1.0.0\",\n  \"description\": \"SvelteKit + Auth.js Developer app\",\n  \"private"
  },
  {
    "path": "apps/dev/sveltekit/src/app.d.ts",
    "chars": 42,
    "preview": "/// <reference types=\"@auth/sveltekit\" />\n"
  },
  {
    "path": "apps/dev/sveltekit/src/app.html",
    "chars": 282,
    "preview": "<!doctype html>\n<html lang=\"en\">\n  <head>\n    <meta charset=\"utf-8\" />\n    <link rel=\"icon\" href=\"%sveltekit.assets%/fav"
  },
  {
    "path": "apps/dev/sveltekit/src/auth.ts",
    "chars": 1566,
    "preview": "import { SvelteKitAuth } from \"@auth/sveltekit\"\nimport GitHub from \"@auth/sveltekit/providers/github\"\nimport Credentials"
  },
  {
    "path": "apps/dev/sveltekit/src/components/header.svelte",
    "chars": 1174,
    "preview": "<script lang=\"ts\">\n  import { page } from \"$app/stores\"\n  import { SignIn, SignOut } from \"@auth/sveltekit/components\"\n<"
  },
  {
    "path": "apps/dev/sveltekit/src/hooks.server.ts",
    "chars": 32,
    "preview": "export { handle } from \"./auth\"\n"
  },
  {
    "path": "apps/dev/sveltekit/src/routes/+layout.server.ts",
    "chars": 164,
    "preview": "import type { LayoutServerLoad } from \"./$types\"\n\nexport const load: LayoutServerLoad = async (event) => {\n  return {\n  "
  },
  {
    "path": "apps/dev/sveltekit/src/routes/+layout.svelte",
    "chars": 123,
    "preview": "<script lang=\"ts\">\n  import Header from \"$components/header.svelte\"\n  import \"../style.css\"\n</script>\n\n<Header />\n<slot "
  },
  {
    "path": "apps/dev/sveltekit/src/routes/+page.svelte",
    "chars": 4069,
    "preview": "<script lang=\"ts\">\n  import { page } from \"$app/stores\"\n  import { SignIn } from \"@auth/sveltekit/components\"\n  import {"
  },
  {
    "path": "apps/dev/sveltekit/src/routes/protected/+page.svelte",
    "chars": 317,
    "preview": "<script lang=\"ts\">\n  import { page } from \"$app/stores\"\n</script>\n\n{#if $page.data.session}\n  <h1>Protected page</h1>\n  "
  },
  {
    "path": "apps/dev/sveltekit/src/routes/signin/+page.server.ts",
    "chars": 134,
    "preview": "import { signIn } from \"$/auth\"\nimport type { Actions } from \"./$types\"\n\nexport const actions = { default: signIn } sati"
  },
  {
    "path": "apps/dev/sveltekit/src/routes/signout/+page.server.ts",
    "chars": 136,
    "preview": "import { signOut } from \"$/auth\"\nimport type { Actions } from \"./$types\"\n\nexport const actions = { default: signOut } sa"
  },
  {
    "path": "apps/dev/sveltekit/src/style.css",
    "chars": 6061,
    "preview": "body {\n  font-family:\n    ui-sans-serif,\n    system-ui,\n    -apple-system,\n    BlinkMacSystemFont,\n    \"Segoe UI\",\n    R"
  },
  {
    "path": "apps/dev/sveltekit/svelte.config.js",
    "chars": 477,
    "preview": "import adapter from \"@sveltejs/adapter-auto\"\nimport { vitePreprocess } from \"@sveltejs/vite-plugin-svelte\"\n\n/** @type {i"
  },
  {
    "path": "apps/dev/sveltekit/tsconfig.json",
    "chars": 555,
    "preview": "{\n  \"extends\": \"./.svelte-kit/tsconfig.json\",\n  \"compilerOptions\": {\n    \"allowJs\": true,\n    \"checkJs\": true,\n    \"esMo"
  },
  {
    "path": "apps/dev/sveltekit/vite.config.js",
    "chars": 176,
    "preview": "import { defineConfig } from \"vite\"\nimport { sveltekit } from \"@sveltejs/kit/vite\"\n\nexport default defineConfig({\n  serv"
  },
  {
    "path": "apps/examples/express/.eslintrc.cjs",
    "chars": 500,
    "preview": "module.exports = {\n  root: true,\n  env: {\n    browser: true,\n    es2021: true,\n  },\n  extends: [\"eslint:recommended\", \"p"
  },
  {
    "path": "apps/examples/express/.gitignore",
    "chars": 230,
    "preview": "# API keys and secrets\n.env\n\n# Dependency directory\nnode_modules\n\n# Editors\n.idea\n*.iml\n.vscode/settings.json\n\n# OS meta"
  },
  {
    "path": "apps/examples/express/.prettierignore",
    "chars": 155,
    "preview": "\n.DS_Store\nnode_modules\n/dist\n/.turbo\n/package\n.env\n.env.*\n!.env.example\n\n# Ignore files for PNPM, NPM and YARN\npnpm-loc"
  },
  {
    "path": "apps/examples/express/.prettierrc",
    "chars": 125,
    "preview": "{\n  \"semi\": false,\n  \"plugins\": [\"@prettier/plugin-pug\", \"prettier-plugin-tailwindcss\"],\n  \"pugClassNotation\": \"attribut"
  },
  {
    "path": "apps/examples/express/README.md",
    "chars": 2807,
    "preview": "> The example repository is maintained from a [monorepo](https://github.com/nextauthjs/next-auth/tree/main/apps/examples"
  },
  {
    "path": "apps/examples/express/api/index.js",
    "chars": 66,
    "preview": "const { app } = await import(\"../src/app.js\")\n\nexport default app\n"
  },
  {
    "path": "apps/examples/express/package.json",
    "chars": 964,
    "preview": "{\n  \"description\": \"Express Auth example app\",\n  \"engines\": {\n    \"node\": \">=20.11.0\"\n  },\n  \"type\": \"module\",\n  \"privat"
  },
  {
    "path": "apps/examples/express/public/css/style.css",
    "chars": 59,
    "preview": "@tailwind base;\n@tailwind components;\n@tailwind utilities;\n"
  },
  {
    "path": "apps/examples/express/src/app.ts",
    "chars": 2080,
    "preview": "// @ts-nocheck\nimport express, { type Request, type Response } from \"express\"\nimport logger from \"morgan\"\nimport * as pa"
  },
  {
    "path": "apps/examples/express/src/config/auth.config.ts",
    "chars": 2140,
    "preview": "import Apple from \"@auth/express/providers/apple\"\nimport Auth0 from \"@auth/express/providers/auth0\"\nimport AzureB2C from"
  },
  {
    "path": "apps/examples/express/src/errors.ts",
    "chars": 315,
    "preview": "export class HttpError extends Error {\n  status: number\n  constructor(status: number, message: string) {\n    super(messa"
  },
  {
    "path": "apps/examples/express/src/middleware/auth.middleware.ts",
    "chars": 715,
    "preview": "// @ts-nocheck\nimport { getSession } from \"@auth/express\"\nimport { authConfig } from \"../config/auth.config.js\"\nimport t"
  },
  {
    "path": "apps/examples/express/src/middleware/error.middleware.ts",
    "chars": 600,
    "preview": "// @ts-nocheck\nimport type { NextFunction, Request, Response } from \"express\"\nimport { HttpError, NotFoundError } from \""
  },
  {
    "path": "apps/examples/express/src/server.ts",
    "chars": 181,
    "preview": "const { app } = await import(\"./app.js\")\n\nconst port = app.get(\"port\")\n\nconst server = app.listen(port, () => {\n  consol"
  },
  {
    "path": "apps/examples/express/tailwind.config.js",
    "chars": 165,
    "preview": "/** @type {import('tailwindcss').Config} */\nexport default {\n  content: [\"./src/*.{html,js,css}\", \"./views/*.pug\"],\n  th"
  },
  {
    "path": "apps/examples/express/tsconfig.json",
    "chars": 396,
    "preview": "{\n  \"compilerOptions\": {\n    \"module\": \"NodeNext\",\n    \"esModuleInterop\": true,\n    \"target\": \"esnext\",\n    \"noImplicitA"
  },
  {
    "path": "apps/examples/express/types/express/index.d.ts",
    "chars": 146,
    "preview": "import { type Session } from \"@auth/express\"\n\ndeclare module \"express\" {\n  interface Response {\n    locals: {\n      sess"
  },
  {
    "path": "apps/examples/express/vercel.json",
    "chars": 119,
    "preview": "{\n  \"$schema\": \"https://openapi.vercel.sh/vercel.json\",\n  \"rewrites\": [{ \"source\": \"/(.*)\", \"destination\": \"/api\" }]\n}\n"
  },
  {
    "path": "apps/examples/express/views/error.pug",
    "chars": 83,
    "preview": "extends layout\n\nblock content\n  h1(class=\"text-3xl font-bold\")= title\n  p= message\n"
  },
  {
    "path": "apps/examples/express/views/index.pug",
    "chars": 364,
    "preview": "extends layout\n\nblock content\n  h1(class=\"text-3xl font-bold\")= title\n  p\n    | This is an example site to demonstrate h"
  },
  {
    "path": "apps/examples/express/views/layout.pug",
    "chars": 1340,
    "preview": "doctype html\nhtml\n  head\n    title= title\n    link(rel=\"stylesheet\", href=\"/css/output.css\")\n    meta(name=\"viewport\", c"
  },
  {
    "path": "apps/examples/express/views/protected.pug",
    "chars": 467,
    "preview": "extends layout\n\nblock content\n  if session\n    h1(class=\"mb-2 text-3xl font-medium\") Protected page\n    p\n      | This i"
  },
  {
    "path": "apps/examples/nextjs/.gitignore",
    "chars": 190,
    "preview": ".DS_Store\n\nnode_modules/\nlogs\n*.log\nnpm-debug.log*\nyarn-debug.log*\nyarn-error.log*\nlerna-debug.log*\n.yarn-integrity\n.npm"
  },
  {
    "path": "apps/examples/nextjs/Dockerfile",
    "chars": 1787,
    "preview": "# syntax=docker/dockerfile:1\nFROM node:20-alpine AS base\n\n# Install dependencies only when needed\nFROM base AS deps\n# Ch"
  },
  {
    "path": "apps/examples/nextjs/README.md",
    "chars": 3951,
    "preview": "> The example repository is maintained from a [monorepo](https://github.com/nextauthjs/next-auth/tree/main/apps/examples"
  },
  {
    "path": "apps/examples/nextjs/app/[...proxy]/route.tsx",
    "chars": 970,
    "preview": "import { auth } from \"@/auth\"\nimport { NextRequest } from \"next/server\"\n\n// Review if we need this, and why\nfunction str"
  },
  {
    "path": "apps/examples/nextjs/app/api/protected/route.ts",
    "chars": 217,
    "preview": "import { auth } from \"auth\"\n\nexport const GET = auth((req) => {\n  if (req.auth) {\n    return Response.json({ data: \"Prot"
  },
  {
    "path": "apps/examples/nextjs/app/api-example/page.tsx",
    "chars": 1191,
    "preview": "\"use client\"\nimport CustomLink from \"@/components/custom-link\"\nimport { useEffect, useState } from \"react\"\n\nexport defau"
  },
  {
    "path": "apps/examples/nextjs/app/auth/[...nextauth]/route.ts",
    "chars": 70,
    "preview": "import { handlers } from \"auth\"\nexport const { GET, POST } = handlers\n"
  },
  {
    "path": "apps/examples/nextjs/app/client-example/page.tsx",
    "chars": 636,
    "preview": "import { auth } from \"auth\"\nimport ClientExample from \"@/components/client-example\"\nimport { SessionProvider } from \"nex"
  },
  {
    "path": "apps/examples/nextjs/app/globals.css",
    "chars": 889,
    "preview": "@tailwind base;\n@tailwind components;\n@tailwind utilities;\n\n@layer base {\n  :root {\n    --background: 0 0% 100%;\n    --f"
  },
  {
    "path": "apps/examples/nextjs/app/layout.tsx",
    "chars": 855,
    "preview": "import \"./globals.css\"\nimport type { Metadata } from \"next\"\nimport { Inter } from \"next/font/google\"\nimport Footer from "
  },
  {
    "path": "apps/examples/nextjs/app/middleware-example/page.tsx",
    "chars": 588,
    "preview": "import CustomLink from \"@/components/custom-link\"\n\nexport default function Page() {\n  return (\n    <div className=\"space"
  },
  {
    "path": "apps/examples/nextjs/app/page.tsx",
    "chars": 1356,
    "preview": "import CustomLink from \"@/components/custom-link\"\nimport { auth } from \"auth\"\n\nexport default async function Index() {\n "
  },
  {
    "path": "apps/examples/nextjs/app/policy/page.tsx",
    "chars": 1379,
    "preview": "export default function PolicyPage() {\n  return (\n    <div className=\"space-y-2\">\n      <section>\n        <h2 className="
  },
  {
    "path": "apps/examples/nextjs/app/server-example/page.tsx",
    "chars": 801,
    "preview": "import CustomLink from \"@/components/custom-link\"\nimport SessionData from \"@/components/session-data\"\nimport { auth } fr"
  },
  {
    "path": "apps/examples/nextjs/auth.ts",
    "chars": 4057,
    "preview": "import NextAuth from \"next-auth\"\nimport \"next-auth/jwt\"\n\nimport Apple from \"next-auth/providers/apple\"\n// import Atlassi"
  },
  {
    "path": "apps/examples/nextjs/components/auth-components.tsx",
    "chars": 702,
    "preview": "import { signIn, signOut } from \"auth\"\nimport { Button } from \"./ui/button\"\n\nexport function SignIn({\n  provider,\n  ...p"
  },
  {
    "path": "apps/examples/nextjs/components/client-example.tsx",
    "chars": 3384,
    "preview": "\"use client\"\n\nimport { useSession } from \"next-auth/react\"\nimport { Button } from \"./ui/button\"\nimport { Input } from \"."
  },
  {
    "path": "apps/examples/nextjs/components/custom-link.tsx",
    "chars": 927,
    "preview": "import { cn } from \"@/lib/utils\"\nimport { ExternalLink } from \"lucide-react\"\nimport Link from \"next/link\"\n\ninterface Cus"
  },
  {
    "path": "apps/examples/nextjs/components/footer.tsx",
    "chars": 1107,
    "preview": "import CustomLink from \"./custom-link\"\nimport packageJSON from \"next-auth/package.json\"\n\nexport default function Footer("
  },
  {
    "path": "apps/examples/nextjs/components/header.tsx",
    "chars": 361,
    "preview": "import { MainNav } from \"./main-nav\"\nimport UserButton from \"./user-button\"\n\nexport default function Header() {\n  return"
  },
  {
    "path": "apps/examples/nextjs/components/main-nav.tsx",
    "chars": 2804,
    "preview": "\"use client\"\n\nimport Image from \"next/image\"\n\nimport { cn } from \"@/lib/utils\"\nimport CustomLink from \"./custom-link\"\nim"
  },
  {
    "path": "apps/examples/nextjs/components/session-data.tsx",
    "chars": 1340,
    "preview": "import type { Session } from \"next-auth\"\n\nexport default function SessionData({ session }: { session: Session | null }) "
  },
  {
    "path": "apps/examples/nextjs/components/ui/avatar.tsx",
    "chars": 1419,
    "preview": "\"use client\"\n\nimport * as React from \"react\"\nimport * as AvatarPrimitive from \"@radix-ui/react-avatar\"\n\nimport { cn } fr"
  },
  {
    "path": "apps/examples/nextjs/components/ui/button.tsx",
    "chars": 1817,
    "preview": "import * as React from \"react\"\nimport { Slot } from \"@radix-ui/react-slot\"\nimport { cva, type VariantProps } from \"class"
  },
  {
    "path": "apps/examples/nextjs/components/ui/dropdown-menu.tsx",
    "chars": 7309,
    "preview": "\"use client\"\n\nimport * as React from \"react\"\nimport * as DropdownMenuPrimitive from \"@radix-ui/react-dropdown-menu\"\nimpo"
  },
  {
    "path": "apps/examples/nextjs/components/ui/input.tsx",
    "chars": 824,
    "preview": "import * as React from \"react\"\n\nimport { cn } from \"@/lib/utils\"\n\nexport interface InputProps\n  extends React.InputHTMLA"
  },
  {
    "path": "apps/examples/nextjs/components/ui/navigation-menu.tsx",
    "chars": 5045,
    "preview": "import * as React from \"react\"\nimport * as NavigationMenuPrimitive from \"@radix-ui/react-navigation-menu\"\nimport { cva }"
  },
  {
    "path": "apps/examples/nextjs/components/user-button.tsx",
    "chars": 1768,
    "preview": "import { Avatar, AvatarFallback, AvatarImage } from \"./ui/avatar\"\nimport { Button } from \"./ui/button\"\nimport { auth } f"
  },
  {
    "path": "apps/examples/nextjs/components.json",
    "chars": 324,
    "preview": "{\n  \"$schema\": \"https://ui.shadcn.com/schema.json\",\n  \"style\": \"default\",\n  \"rsc\": true,\n  \"tsx\": true,\n  \"tailwind\": {\n"
  },
  {
    "path": "apps/examples/nextjs/docker-compose.yml",
    "chars": 349,
    "preview": "services:\n  authjs-docker-test:\n    build: .\n    environment:\n      - TEST_KEYCLOAK_USERNAME\n      - TEST_KEYCLOAK_PASSW"
  },
  {
    "path": "apps/examples/nextjs/lib/utils.ts",
    "chars": 166,
    "preview": "import { type ClassValue, clsx } from \"clsx\"\nimport { twMerge } from \"tailwind-merge\"\n\nexport function cn(...inputs: Cla"
  },
  {
    "path": "apps/examples/nextjs/middleware.ts",
    "chars": 383,
    "preview": "export { auth as middleware } from \"auth\"\n\n// Or like this if you need to do something here.\n// export default auth((req"
  },
  {
    "path": "apps/examples/nextjs/next.config.js",
    "chars": 86,
    "preview": "/** @type {import(\"next\").NextConfig} */\nmodule.exports = {\n  output: \"standalone\",\n}\n"
  },
  {
    "path": "apps/examples/nextjs/package.json",
    "chars": 1526,
    "preview": "{\n  \"private\": true,\n  \"description\": \"An example project for NextAuth.js with Next.js\",\n  \"repository\": \"https://github"
  },
  {
    "path": "apps/examples/nextjs/postcss.config.js",
    "chars": 82,
    "preview": "module.exports = {\n  plugins: {\n    tailwindcss: {},\n    autoprefixer: {},\n  },\n}\n"
  },
  {
    "path": "apps/examples/nextjs/tailwind.config.js",
    "chars": 2127,
    "preview": "/** @type {import('tailwindcss').Config} */\nmodule.exports = {\n  darkMode: \"selector\",\n  content: [\n    \"./pages/**/*.{t"
  },
  {
    "path": "apps/examples/nextjs/test-docker.sh",
    "chars": 706,
    "preview": "#!/usr/bin/env bash\n\n# Easier to read `docker compose up` output\n# export BUILDKIT_PROGRESS=plain\n\nargs=(\"-f\" \"docker-co"
  },
  {
    "path": "apps/examples/nextjs/tsconfig.json",
    "chars": 704,
    "preview": "{\n  \"compilerOptions\": {\n    \"target\": \"es5\",\n    \"lib\": [\"dom\", \"dom.iterable\", \"esnext\"],\n    \"allowJs\": true,\n    \"sk"
  },
  {
    "path": "apps/examples/nextjs-pages/.gitignore",
    "chars": 190,
    "preview": ".DS_Store\n\nnode_modules/\nlogs\n*.log\nnpm-debug.log*\nyarn-debug.log*\nyarn-error.log*\nlerna-debug.log*\n.yarn-integrity\n.npm"
  },
  {
    "path": "apps/examples/nextjs-pages/README.md",
    "chars": 3947,
    "preview": "> The example repository is maintained from a [monorepo](https://github.com/nextauthjs/next-auth/tree/main/apps/examples"
  },
  {
    "path": "apps/examples/nextjs-pages/app/api/auth/[...nextauth]/route.ts",
    "chars": 616,
    "preview": "// import { handlers } from \"../../../auth\"\n// const { GET, POST } = handlers\n//\n// const handler = async (req, res) => "
  },
  {
    "path": "apps/examples/nextjs-pages/auth.ts",
    "chars": 4833,
    "preview": "import NextAuth from \"next-auth\"\n\n// import Apple from \"next-auth/providers/apple\"\n// import Auth0 from \"next-auth/provi"
  },
  {
    "path": "apps/examples/nextjs-pages/components/auth-components.tsx",
    "chars": 545,
    "preview": "import { signIn, signOut } from \"next-auth/react\"\nimport { Button } from \"./ui/button\"\n\nexport function SignIn({\n  provi"
  },
  {
    "path": "apps/examples/nextjs-pages/components/client-example.tsx",
    "chars": 2138,
    "preview": "import { useSession } from \"next-auth/react\"\nimport { Button } from \"./ui/button\"\nimport { Input } from \"./ui/input\"\nimp"
  },
  {
    "path": "apps/examples/nextjs-pages/components/custom-link.tsx",
    "chars": 850,
    "preview": "import { cn } from \"@/lib/utils\"\nimport { ExternalLink } from \"lucide-react\"\nimport Link from \"next/link\"\n\ninterface Cus"
  },
  {
    "path": "apps/examples/nextjs-pages/components/footer.tsx",
    "chars": 664,
    "preview": "import CustomLink from \"./custom-link\"\n\nexport default function Footer() {\n  return (\n    <footer className=\"mx-0 my-4 f"
  }
]

// ... and 894 more files (download for full content)

About this extraction

This page contains the full source code of the nextauthjs/next-auth GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 1094 files (2.7 MB), approximately 773.5k tokens, and a symbol index with 1202 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.

Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.

Copied to clipboard!