mirror of
https://github.com/SrIzan10/next-auth.git
synced 2026-05-01 10:55:20 +00:00
Compare commits
52 Commits
@auth/core
...
@auth/soli
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c6f5c4d1cf | ||
|
|
09a075cc7e | ||
|
|
f1475955ea | ||
|
|
e6f48775fa | ||
|
|
ba87e86d47 | ||
|
|
b0dd1fac93 | ||
|
|
054288316b | ||
|
|
5e02019a3c | ||
|
|
9da0e66193 | ||
|
|
287c8f0f91 | ||
|
|
87ed5077ad | ||
|
|
2cbf815445 | ||
|
|
d63166db3a | ||
|
|
f387793d71 | ||
|
|
b0ecf4e861 | ||
|
|
5a73c6efa3 | ||
|
|
4aec142525 | ||
|
|
45f423ed5d | ||
|
|
2e52a89c52 | ||
|
|
ecde35e9c4 | ||
|
|
5a51330d55 | ||
|
|
b2db3eabee | ||
|
|
3865e44c1e | ||
|
|
9f5acc5749 | ||
|
|
0bbc8246b8 | ||
|
|
511f66b0a8 | ||
|
|
ae57199258 | ||
|
|
aad425fced | ||
|
|
8ef1010bb1 | ||
|
|
950ca3169a | ||
|
|
edbf0fc011 | ||
|
|
46bac818fe | ||
|
|
9e64eb0cdd | ||
|
|
955e379330 | ||
|
|
7be4461253 | ||
|
|
c2e06dc445 | ||
|
|
4dd70a5f6f | ||
|
|
98dbf56494 | ||
|
|
6b4644f7e7 | ||
|
|
bcf909b69e | ||
|
|
4dcdd21242 | ||
|
|
137d993a13 | ||
|
|
8dda662cd6 | ||
|
|
8a438bab32 | ||
|
|
4aaad03e9c | ||
|
|
4fa0d1fa2a | ||
|
|
c081773667 | ||
|
|
1ab0a2aed4 | ||
|
|
cac9816d32 | ||
|
|
65defc709e | ||
|
|
1601626d31 | ||
|
|
8c4f439279 |
8
.github/PULL_REQUEST_TEMPLATE.md
vendored
8
.github/PULL_REQUEST_TEMPLATE.md
vendored
@@ -8,7 +8,7 @@ merge of your pull request!
|
|||||||
> _NOTE_:
|
> _NOTE_:
|
||||||
>
|
>
|
||||||
> - It's a good idea to open an issue first to discuss potential changes.
|
> - 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](../Security.md) to disclose the issue to us confidentially.
|
> - 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
|
## ☕️ Reasoning
|
||||||
|
|
||||||
@@ -28,7 +28,7 @@ Fixes: INSERT_ISSUE_LINK_HERE
|
|||||||
|
|
||||||
## 📌 Resources
|
## 📌 Resources
|
||||||
|
|
||||||
- [Security guidelines](../Security.md)
|
- [Security guidelines](https://github.com/nextauthjs/.github/blob/main/SECURITY.md)
|
||||||
- [Contributing guidelines](../CONTRIBUTING.md)
|
- [Contributing guidelines](https://github.com/nextauthjs/.github/blob/main/CONTRIBUTING.md)
|
||||||
- [Code of conduct](../CODE_OF_CONDUCT.md)
|
- [Code of conduct](https://github.com/nextauthjs/.github/blob/main/CODE_OF_CONDUCT.md)
|
||||||
- [Contributing to Open Source](https://kcd.im/pull-request)
|
- [Contributing to Open Source](https://kcd.im/pull-request)
|
||||||
|
|||||||
2
.github/actions/issue-validator/index.mjs
vendored
2
.github/actions/issue-validator/index.mjs
vendored
File diff suppressed because one or more lines are too long
3
.github/actions/issue-validator/licenses.txt
vendored
3
.github/actions/issue-validator/licenses.txt
vendored
@@ -526,7 +526,7 @@ IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|||||||
root
|
root
|
||||||
ISC License
|
ISC License
|
||||||
|
|
||||||
Copyright (c) 2018-2021, Iain Collins
|
Copyright (c) 2022-2023, Balázs Orbán
|
||||||
|
|
||||||
Permission to use, copy, modify, and/or distribute this software for any
|
Permission to use, copy, modify, and/or distribute this software for any
|
||||||
purpose with or without fee is hereby granted, provided that the above
|
purpose with or without fee is hereby granted, provided that the above
|
||||||
@@ -540,6 +540,7 @@ WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
|||||||
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
||||||
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
|
|
||||||
|
|
||||||
tr46
|
tr46
|
||||||
MIT
|
MIT
|
||||||
|
|
||||||
|
|||||||
14
.github/actions/issue-validator/src/index.mjs
vendored
14
.github/actions/issue-validator/src/index.mjs
vendored
@@ -4,6 +4,7 @@ import * as github from "@actions/github"
|
|||||||
// @ts-expect-error
|
// @ts-expect-error
|
||||||
import * as core from "@actions/core"
|
import * as core from "@actions/core"
|
||||||
import { readFileSync } from "node:fs"
|
import { readFileSync } from "node:fs"
|
||||||
|
import { join } from "node:path"
|
||||||
|
|
||||||
const addReproductionLabel = "incomplete"
|
const addReproductionLabel = "incomplete"
|
||||||
|
|
||||||
@@ -40,7 +41,13 @@ async function run() {
|
|||||||
label: { name: newLabel },
|
label: { name: newLabel },
|
||||||
} = payload
|
} = payload
|
||||||
|
|
||||||
if (pull_request || !issue?.body || !process.env.GITHUB_TOKEN) return
|
if (
|
||||||
|
pull_request ||
|
||||||
|
!issue?.body ||
|
||||||
|
!process.env.GITHUB_TOKEN ||
|
||||||
|
!process.env.GITHUB_ACTION_PATH
|
||||||
|
)
|
||||||
|
return
|
||||||
|
|
||||||
const labels = issue.labels.map((l) => l.name)
|
const labels = issue.labels.map((l) => l.name)
|
||||||
// const isBugReport =
|
// const isBugReport =
|
||||||
@@ -70,7 +77,10 @@ async function run() {
|
|||||||
}),
|
}),
|
||||||
client.issues.createComment({
|
client.issues.createComment({
|
||||||
...issueCommon,
|
...issueCommon,
|
||||||
body: readFileSync("repro.md", "utf8"),
|
body: readFileSync(
|
||||||
|
join(process.env.GITHUB_ACTION_PATH, "repro.md"),
|
||||||
|
"utf8"
|
||||||
|
),
|
||||||
}),
|
}),
|
||||||
])
|
])
|
||||||
return core.info(
|
return core.info(
|
||||||
|
|||||||
98
.github/pr-labeler.yml
vendored
98
.github/pr-labeler.yml
vendored
@@ -1,74 +1,26 @@
|
|||||||
# https://github.com/actions/labeler#create-githublabeleryml
|
# https://github.com/actions/labeler#create-githublabeleryml
|
||||||
|
adapters: ["packages/core/src/adapters.ts", "packages/adapter-*/**/*"]
|
||||||
test:
|
core: ["packages/core/src/**/*"]
|
||||||
- test/**/*
|
dgraph: ["packages/adapter-dgraph/**/*"]
|
||||||
- types/tests/**/*
|
documentation: ["packages/docs/docs/**/*"]
|
||||||
|
dynamodb: ["packages/adapter-dynamodb/**/*"]
|
||||||
providers:
|
examples: ["apps/examples/**/*"]
|
||||||
- packages/next-auth/src/providers/**/*
|
fauna: ["packages/adapter-fauna/**/*"]
|
||||||
- test/integration/**/*
|
firebase: ["packages/adapter-firebase/**/*"]
|
||||||
|
frameworks: ["packages/frameworks-*/**/*"]
|
||||||
adapters:
|
legacy: ["packages/next-auth/**/*"]
|
||||||
- packages/next-auth/src/adapters.ts
|
mikro-orm: ["packages/adapter-mikro-orm/**/*"]
|
||||||
- packages/adapter-*/**
|
mongodb: ["packages/adapter-mongodb/**/*"]
|
||||||
|
neo4j: ["packages/adapter-neo4j/**/*"]
|
||||||
dgraph:
|
playgrounds: ["apps/playgrounds/**/*"]
|
||||||
- packages/adapter-dgraph/**
|
pouchdb: ["packages/adapter-pouchdb/**/*"]
|
||||||
|
prisma: ["packages/adapter-prisma/**/*"]
|
||||||
dynamodb:
|
providers: ["packages/core/src/providers/**/*"]
|
||||||
- packages/adapter-dynamodb/**
|
sequelize: ["packages/adapter-sequelize/**/*"]
|
||||||
|
solidjs: ["packages/frameworks-solid-start/**/*"]
|
||||||
fauna:
|
supabase: ["packages/adapter-supabase/**/*"]
|
||||||
- packages/adapter-fauna/**
|
svelte: ["packages/frameworks-sveltekit/**/*"]
|
||||||
|
test: ["**test**/*"]
|
||||||
firebase:
|
typeorm-legacy: ["packages/adapter-typeorm-legacy/**/*"]
|
||||||
- packages/adapter-firebase/**
|
upstash-redis: ["packages/adapter-upstash-redis/**/*"]
|
||||||
|
xata: ["packages/adapter-xata/**/*"]
|
||||||
mikro-orm:
|
|
||||||
- packages/adapter-mikro-orm/**
|
|
||||||
|
|
||||||
mongodb:
|
|
||||||
- packages/adapter-mongodb/**
|
|
||||||
|
|
||||||
neo4j:
|
|
||||||
- packages/adapter-neo4j/**
|
|
||||||
|
|
||||||
pouchdb:
|
|
||||||
- packages/adapter-pouchdb/**
|
|
||||||
|
|
||||||
prisma:
|
|
||||||
- packages/adapter-prisma/**
|
|
||||||
|
|
||||||
sequelize:
|
|
||||||
- packages/adapter-sequelize/**
|
|
||||||
|
|
||||||
supabase:
|
|
||||||
- packages/adapter-supabase/**
|
|
||||||
|
|
||||||
typeorm-legacy:
|
|
||||||
- packages/adapter-typeorm-legacy/**
|
|
||||||
|
|
||||||
upstash-redis:
|
|
||||||
- packages/adapter-upstash-redis/**
|
|
||||||
|
|
||||||
xata:
|
|
||||||
- packages/adapter-xata/**
|
|
||||||
|
|
||||||
core:
|
|
||||||
- packages/next-auth/src/**/*
|
|
||||||
|
|
||||||
style:
|
|
||||||
- packages/next-auth/src/css/**/*
|
|
||||||
|
|
||||||
client:
|
|
||||||
- packages/next-auth/src/client/**/*
|
|
||||||
- packages/next-auth/src/react/**/*
|
|
||||||
|
|
||||||
pages:
|
|
||||||
- packages/next-auth/src/core/pages/**/*
|
|
||||||
|
|
||||||
TypeScript:
|
|
||||||
- packages/next-auth/src/**/types.ts
|
|
||||||
|
|
||||||
documentation:
|
|
||||||
- packages/docs/docs/**/*
|
|
||||||
|
|||||||
14
.github/sync.yml
vendored
14
.github/sync.yml
vendored
@@ -1,14 +1,24 @@
|
|||||||
# Note that nextauthjs/next-auth-example syncs from the v4 branch
|
# Note that nextauthjs/next-auth-example syncs from the v4 branch
|
||||||
|
|
||||||
nextauthjs/sveltekit-auth-example:
|
nextauthjs/sveltekit-auth-example:
|
||||||
- source: apps/example-sveltekit
|
- source: apps/examples/sveltekit
|
||||||
dest: .
|
dest: .
|
||||||
deleteOrphaned: true
|
deleteOrphaned: true
|
||||||
- .github/FUNDING.yml
|
- .github/FUNDING.yml
|
||||||
- LICENSE
|
- LICENSE
|
||||||
|
|
||||||
|
# FIXME: Should re-enable, but currently fails:
|
||||||
|
# https://github.com/nextauthjs/next-auth/actions/runs/3811709391/jobs/6484533340
|
||||||
|
# (issue seems to be the name of the target repo)
|
||||||
|
# nextauthjs/solid-start-auth-example:
|
||||||
|
# - source: "apps/examples/solid-start"
|
||||||
|
# dest: .
|
||||||
|
# deleteOrphaned: true
|
||||||
|
# - .github/FUNDING.yml
|
||||||
|
# - LICENSE
|
||||||
|
|
||||||
nextauthjs/next-auth-gatsby-example:
|
nextauthjs/next-auth-gatsby-example:
|
||||||
- source: apps/playground-gatsby
|
- source: apps/playgrounds/gatsby
|
||||||
dest: .
|
dest: .
|
||||||
deleteOrphaned: true
|
deleteOrphaned: true
|
||||||
- .github/FUNDING.yml
|
- .github/FUNDING.yml
|
||||||
|
|||||||
3
.github/workflows/release.yml
vendored
3
.github/workflows/release.yml
vendored
@@ -29,9 +29,12 @@ jobs:
|
|||||||
run: pnpm install
|
run: pnpm install
|
||||||
- name: Run tests
|
- name: Run tests
|
||||||
run: pnpm test
|
run: pnpm test
|
||||||
|
timeout-minutes: 15
|
||||||
env:
|
env:
|
||||||
UPSTASH_REDIS_URL: ${{ secrets.UPSTASH_REDIS_URL }}
|
UPSTASH_REDIS_URL: ${{ secrets.UPSTASH_REDIS_URL }}
|
||||||
UPSTASH_REDIS_KEY: ${{ secrets.UPSTASH_REDIS_KEY }}
|
UPSTASH_REDIS_KEY: ${{ secrets.UPSTASH_REDIS_KEY }}
|
||||||
|
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}
|
||||||
|
TURBO_TEAM: ${{ secrets.TURBO_TEAM }}
|
||||||
# - name: Coverage
|
# - name: Coverage
|
||||||
# uses: codecov/codecov-action@v1
|
# uses: codecov/codecov-action@v1
|
||||||
# with:
|
# with:
|
||||||
|
|||||||
2
.github/workflows/sync-examples.yml
vendored
2
.github/workflows/sync-examples.yml
vendored
@@ -14,6 +14,6 @@ jobs:
|
|||||||
# Can update to v1 when https://github.com/BetaHuhn/repo-file-sync-action/issues/168 is resolved
|
# Can update to v1 when https://github.com/BetaHuhn/repo-file-sync-action/issues/168 is resolved
|
||||||
uses: BetaHuhn/repo-file-sync-action@v1.16.5
|
uses: BetaHuhn/repo-file-sync-action@v1.16.5
|
||||||
with:
|
with:
|
||||||
GH_PAT: ${{ secrets.SYNC_EXAMPLE_PAT }}
|
GH_PAT: ${{ secrets.GH_PAT_CLASSIC }}
|
||||||
SKIP_PR: true
|
SKIP_PR: true
|
||||||
ORIGINAL_MESSAGE: true
|
ORIGINAL_MESSAGE: true
|
||||||
|
|||||||
1
.gitignore
vendored
1
.gitignore
vendored
@@ -86,6 +86,7 @@ packages/core/*.d.ts
|
|||||||
packages/core/*.d.ts.map
|
packages/core/*.d.ts.map
|
||||||
packages/core/lib
|
packages/core/lib
|
||||||
packages/core/providers
|
packages/core/providers
|
||||||
|
packages/core/src/lib/pages/styles.ts
|
||||||
docs/docs/reference/03-core
|
docs/docs/reference/03-core
|
||||||
docs/docs/reference/04-sveltekit
|
docs/docs/reference/04-sveltekit
|
||||||
|
|
||||||
|
|||||||
@@ -23,6 +23,7 @@ build
|
|||||||
docs/docs/reference/03-core
|
docs/docs/reference/03-core
|
||||||
docs/docs/reference/04-sveltekit
|
docs/docs/reference/04-sveltekit
|
||||||
static
|
static
|
||||||
|
docs/providers.json
|
||||||
|
|
||||||
# --------------- Packages ---------------
|
# --------------- Packages ---------------
|
||||||
|
|
||||||
|
|||||||
@@ -12,5 +12,11 @@ module.exports = {
|
|||||||
],
|
],
|
||||||
options: { printWidth: 150 },
|
options: { printWidth: 150 },
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
files: ["**/*package.json"],
|
||||||
|
options: {
|
||||||
|
trailingComma: "none",
|
||||||
|
},
|
||||||
|
},
|
||||||
],
|
],
|
||||||
}
|
}
|
||||||
|
|||||||
4
apps/dev/.vscode/settings.json
vendored
4
apps/dev/.vscode/settings.json
vendored
@@ -1,4 +0,0 @@
|
|||||||
{
|
|
||||||
"typescript.tsdk": "../../node_modules/.pnpm/typescript@4.8.4/node_modules/typescript/lib",
|
|
||||||
"typescript.enablePromptUseWorkspaceTsdk": true
|
|
||||||
}
|
|
||||||
4
apps/dev/nextjs/.vscode/settings.json
vendored
Normal file
4
apps/dev/nextjs/.vscode/settings.json
vendored
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
{
|
||||||
|
"typescript.tsdk": "../../../node_modules/.pnpm/typescript@4.9.4/node_modules/typescript/lib",
|
||||||
|
"typescript.enablePromptUseWorkspaceTsdk": true
|
||||||
|
}
|
||||||
@@ -3,4 +3,4 @@
|
|||||||
This folder contains a Next.js app using NextAuth.js for local development. See the following section on how to start:
|
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
|
[Setting up local environment
|
||||||
](https://github.com/nextauthjs/next-auth/blob/main/CONTRIBUTING.md#setting-up-local-environment)
|
](https://github.com/nextauthjs/.github/blob/main/CONTRIBUTING.md#setting-up-local-environment)
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "next-auth-app",
|
"name": "next-auth-app",
|
||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
"description": "NextAuth.js Developer app",
|
"description": "Next.js + Auth.js Developer app",
|
||||||
"private": true,
|
"private": true,
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"clean": "rm -rf .next",
|
"clean": "rm -rf .next",
|
||||||
@@ -20,7 +20,7 @@
|
|||||||
"@prisma/client": "^3",
|
"@prisma/client": "^3",
|
||||||
"@supabase/supabase-js": "^2.0.5",
|
"@supabase/supabase-js": "^2.0.5",
|
||||||
"faunadb": "^4",
|
"faunadb": "^4",
|
||||||
"next": "13.0.6",
|
"next": "13.1.1",
|
||||||
"next-auth": "workspace:*",
|
"next-auth": "workspace:*",
|
||||||
"@auth/core": "workspace:*",
|
"@auth/core": "workspace:*",
|
||||||
"nodemailer": "^6",
|
"nodemailer": "^6",
|
||||||
@@ -1,4 +1,8 @@
|
|||||||
{
|
{
|
||||||
|
"name": "sveltekit-auth-app",
|
||||||
|
"version": "1.0.0",
|
||||||
|
"description": "SvelteKit + Auth.js Developer app",
|
||||||
|
"private": true,
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "vite dev",
|
"dev": "vite dev",
|
||||||
"build": "vite build",
|
"build": "vite build",
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
import SvelteKitAuth from "@auth/sveltekit"
|
import { SvelteKitAuth } from "@auth/sveltekit"
|
||||||
import GitHub from "@auth/core/providers/github"
|
import GitHub from "@auth/core/providers/github"
|
||||||
import { GITHUB_ID, GITHUB_SECRET } from "$env/static/private"
|
import { GITHUB_ID, GITHUB_SECRET } from "$env/static/private"
|
||||||
|
|
||||||
@@ -2,9 +2,18 @@
|
|||||||
import { page } from "$app/stores"
|
import { page } from "$app/stores"
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
{#if $page.data.session}
|
||||||
<h1>Protected page</h1>
|
<h1>Protected page</h1>
|
||||||
<p>
|
<p>
|
||||||
This is a protected content. You can access this content because you are
|
This is a protected content. You can access this content because you are
|
||||||
signed in.
|
signed in.
|
||||||
</p>
|
</p>
|
||||||
<p>Session expiry: {$page.data.session?.expires}</p>
|
<p>Session expiry: {$page.data.session?.expires}</p>
|
||||||
|
{:else}
|
||||||
|
<h1>Access Denied</h1>
|
||||||
|
<p>
|
||||||
|
<a href="/auth/signin">
|
||||||
|
You must be signed in to view this page
|
||||||
|
</a>
|
||||||
|
</p>
|
||||||
|
{/if}
|
||||||
|
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 1.5 KiB |
5
apps/example-nextjs/next-env.d.ts
vendored
5
apps/example-nextjs/next-env.d.ts
vendored
@@ -1,5 +0,0 @@
|
|||||||
/// <reference types="next" />
|
|
||||||
/// <reference types="next/image-types/global" />
|
|
||||||
|
|
||||||
// NOTE: This file should not be edited
|
|
||||||
// see https://nextjs.org/docs/basic-features/typescript for more information.
|
|
||||||
@@ -1,10 +0,0 @@
|
|||||||
import { redirect } from "@sveltejs/kit"
|
|
||||||
import type { PageLoad } from "./$types"
|
|
||||||
|
|
||||||
export const load: PageLoad = async ({ parent }) => {
|
|
||||||
const { session } = await parent()
|
|
||||||
if (!session?.user) {
|
|
||||||
throw redirect(302, "/")
|
|
||||||
}
|
|
||||||
return {}
|
|
||||||
}
|
|
||||||
3
apps/examples/solid-start/.env.example
Normal file
3
apps/examples/solid-start/.env.example
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
GITHUB_ID=
|
||||||
|
GITHUB_SECRET=
|
||||||
|
AUTH_SECRET=
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user