Skip to content

Commit

Permalink
Merge branch 'main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
lacymorrow authored Dec 4, 2024
2 parents 65ac7c2 + 00b16ae commit f27d408
Show file tree
Hide file tree
Showing 319 changed files with 9,479 additions and 10,868 deletions.
4 changes: 4 additions & 0 deletions .github/ISSUE_TEMPLATE/2_bug_provider.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ body:
- "42 School"
- "Apple"
- "Asgardeo"
- "Atlassian"
- "Auth0"
- "Authentik"
- "Azure Active Directory"
Expand All @@ -37,6 +38,7 @@ body:
- "Bungie"
- "ClickUp"
- "Cognito"
- "Concept2"
- "Coinbase"
- "Descope"
- "Discord"
Expand All @@ -59,13 +61,15 @@ body:
- "Kinde"
- "Line"
- "LinkedIn"
- "Loops"
- "Mailchimp"
- "Mail.ru"
- "Mastodon"
- "Medium"
- "Naver"
- "Netlify"
- "NetSuite"
- "Nextcloud"
- "Notion"
- "Okta"
- "OneLogin"
Expand Down
15 changes: 15 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# 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"
98 changes: 40 additions & 58 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,54 +15,38 @@ on:
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"
- "next-auth"
# TODO: Infer from package name
path:
type: choice
description: Directory name (packages/*)
options:
- "core"
- "frameworks-nextjs"
- "adapter-edgedb"
- "adapter-dgraph"
- "adapter-drizzle"
- "adapter-dynamodb"
- "adapter-fauna"
- "adapter-firebase"
- "adapter-hasura"
- "adapter-mikro-orm"
- "adapter-mongodb"
- "adapter-neo4j"
- "adapter-pouchdb"
- "adapter-prisma"
- "adapter-sequelize"
- "adapter-supabase"
- "adapter-surrealdb"
- "adapter-typeorm"
- "adapter-unstorage"
- "adapter-upstash-redis"
- "adapter-xata"
- "next-auth"

permissions:
id-token: write

Expand Down Expand Up @@ -113,40 +97,18 @@ jobs:
- name: Run unit tests
if: ${{ env.PACKAGES_CHANGES == 'true' || github.ref == 'refs/heads/main' }}
run: pnpm test
- name: Get installed Playwright version
id: playwright-version
run: echo "PLAYWRIGHT_VERSION=$(pnpx playwright -V | awk '{ print $2 }')" >> $GITHUB_ENV
- name: Cache playwright binaries
uses: actions/cache@v4
id: playwright-cache
with:
path: |
~/.cache/ms-playwright
key: ${{ runner.os }}-playwright-${{ env.PLAYWRIGHT_VERSION }}
- name: Install Playwright
if: steps.playwright-cache.outputs.cache-hit != 'true' && github.repository == 'nextauthjs/next-auth'
run: |
pnpm exec playwright install --with-deps chromium
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
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
run: cd apps/examples/nextjs-docker && pnpm test:docker
- name: Run E2E tests
continue-on-error: true # TODO: Make this less flakey
if: github.repository == 'nextauthjs/next-auth'
if: ${{ env.PACKAGES_CHANGES == 'true' || github.ref == 'refs/heads/main' }}
timeout-minutes: 15
run: |
pnpm test:e2e
env:
AUTH_SECRET: ${{ secrets.AUTH_SECRET }}
TEST_KEYCLOAK_USERNAME: ${{ secrets.TEST_KEYCLOAK_USERNAME }}
Expand All @@ -155,11 +117,13 @@ jobs:
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/utils/test-results/*/trace.zip"
path: "**/packages/next-auth/test-results/*/trace.zip"
retention-days: 7
- uses: codecov/codecov-action@v4
if: always()
Expand Down Expand Up @@ -254,11 +218,29 @@ jobs:
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: ${{ github.event.inputs.path }}
PACKAGE_PATH: ${{ env.PACKAGE_PATH }}
- name: Publish to npm
run: |
pnpm build
Expand All @@ -269,5 +251,5 @@ jobs:
echo "Install via: pnpm add ${{ github.event.inputs.name }}@${{ env.VERSION }}"
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
PACKAGE_PATH: ${{ github.event.inputs.path }}
PACKAGE_PATH: ${{ env.PACKAGE_PATH }}
VERSION: ${{ steps.determine-version.outputs.version }}
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ docs/.next
docs/manifest.mjs

# Core
packages/core/src/providers/oauth-types.ts
packages/core/src/providers/provider-types.ts
packages/core/lib
packages/core/providers
packages/core/src/lib/pages/styles.ts
Expand Down
4 changes: 2 additions & 2 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ packages/**/*.js
!packages/*/scripts/*.js

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

# @auth/sveltekit
Expand All @@ -43,7 +43,7 @@ packages/frameworks-sveltekit/vite.config.{js,ts}.timestamp-*
packages/frameworks-express/providers

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

# Adapters
Expand Down
2 changes: 1 addition & 1 deletion .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"recommendations": ["esbenp.prettier-vscode"]
"recommendations": ["esbenp.prettier-vscode", "bradlc.vscode-tailwindcss"]
}
45 changes: 34 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,13 @@
<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://github.com/nextauthjs/next-auth/releases"><img src="https://img.shields.io/github/v/release/nextauthjs/next-auth?style=flat-square&label=latest%20release&color=purple" alt="GitHub Stable Release" /></a>
<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>
<a href="https://github.com/nextauthjs/next-auth/releases"><img src="https://img.shields.io/npm/v/next-auth/beta?style=flat-square&label=latest%20NextAuth.js v5" alt="NPM next-auth@beta 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>
<!-- <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">
Expand Down Expand Up @@ -106,13 +108,6 @@ We have an [OpenCollective](https://opencollective.com/nextauth) for companies a
<div>FusionAuth</div>
<sub>💵</sub>
</td>
<td align="center" valign="top">
<a href="https://www.beyondidentity.com" target="_blank">
<img height="96" src="https://avatars.githubusercontent.com/u/69811361?s=200&v=4" alt="Beyond Identity Logo" />
</a><br />
<div>Beyond Identity</div>
<sub>💵</sub>
</td>
<td align="center" valign="top">
<a href="https://stytch.com" target="_blank">
<img height="96" src="https://avatars.githubusercontent.com/u/69983493?s=200&v=4" alt="Stytch Logo" />
Expand All @@ -127,8 +122,22 @@ We have an [OpenCollective](https://opencollective.com/nextauth) for companies a
<div>Prisma</div>
<sub>💵</sub>
</td>
<td align="center" valign="top">
<a href="https://neon.tech" target="_blank">
<img height="96" src="https://avatars.githubusercontent.com/u/77690634?v=4" alt="Neon Logo" />
</a><br />
<div>Neon</div>
<sub>💵</sub>
</td>
</tr>
<tr>
<td align="center" valign="top">
<a href="https://www.beyondidentity.com" target="_blank">
<img height="96" src="https://avatars.githubusercontent.com/u/69811361?s=200&v=4" alt="Beyond Identity Logo" />
</a><br />
<div>Beyond Identity</div>
<sub>💵</sub>
</td>
<td align="center" valign="top">
<a href="https://lowdefy.com" target="_blank">
<img height="96" src="https://avatars.githubusercontent.com/u/47087496?s=200&v=4" alt="Lowdefy Logo" />
Expand Down Expand Up @@ -157,22 +166,36 @@ We have an [OpenCollective](https://opencollective.com/nextauth) for companies a
<div>Encore</div>
<sub>💵</sub>
</td>
<td align="center" valign="top">
<a href="https://sent.dm/?ref=auth.js" target="_blank">
<img width="108" src="https://avatars.githubusercontent.com/u/153308555?v=4" alt="Sent.dm Logo" />
</a><br />
<div>Sent.dm</div>
<sub>💵</sub>
</td>
</tr>
<tr>
<td align="center" valign="top">
<a href="https://arcjet.com/?ref=auth.js" target="_blank">
<img width="108" src="https://avatars.githubusercontent.com/u/24397786?s=200&v=4" alt="Arcjet Logo" />
</a><br />
<div>Arcjet</div>
<sub>💵</sub>
</td>
<td align="center" valign="top">
<a href="https://route4me.com/?ref=auth.js" target="_blank">
<img width="108" src="https://avatars.githubusercontent.com/u/7936820?v=4" alt="Route4Me Logo" />
</a><br />
<div>Route4Me</div>
<sub>💵</sub>
</td>
<td align="center" valign="top">
<a href="https://www.netlight.com/" target="_blank">
<img height="96" src="https://avatars.githubusercontent.com/u/1672348?s=200&v=4" alt="Netlight logo" />
</a><br />
<div>Netlight</div>
<sub>☁️</sub>
</td>
</tr>
<tr>
<td align="center" valign="top">
<a href="https://checklyhq.com" target="_blank">
<img height="96" src="https://avatars.githubusercontent.com/u/25982255?s=200&v=4" alt="Checkly Logo" />
Expand Down
5 changes: 1 addition & 4 deletions apps/dev/express/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"license": "MIT",
"dependencies": {
"@auth/express": "workspace:*",
"express": "^4.19.2",
"express": "^4.20.0",
"morgan": "^1.10.0",
"pug": "^3.0.2"
},
Expand All @@ -28,8 +28,5 @@
"@types/pug": "^2.0.10",
"tsx": "^4.7.3",
"typescript": "5.4.5"
},
"engines": {
"node": ">=20.11.0"
}
}
1 change: 1 addition & 0 deletions apps/dev/nextjs/.env.local.example
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ AUTH_BEYOND_IDENTITY_ISSUER=

AUTH_DESCOPE_ID=
AUTH_DESCOPE_SECRET=
AUTH_DESCOPE_ISSUER=

AUTH_GITHUB_ID=
AUTH_GITHUB_SECRET=
Expand Down
6 changes: 5 additions & 1 deletion apps/dev/nextjs/app/client.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,11 @@ export default function Client() {
) : (
<>
<button onClick={() => signIn("github")}>Sign in GitHub</button>
<button onClick={() => signIn("credentials", {})}>
<button
onClick={async () => {
await signIn("webauthn", {})
}}
>
Sign in Credentials
</button>
</>
Expand Down
Loading

0 comments on commit f27d408

Please sign in to comment.