Compare commits

..

11 Commits

Author SHA1 Message Date
GitHub Actions
06cc2dfde0 chore(release): bump package version(s) [skip ci] 2023-10-24 00:26:45 +00:00
Balázs Orbán
f77704bb7e feat(ts): use User as Sessionuser type 2023-10-23 12:19:26 -07:00
Yangshun Tay
c3388bde47 docs: fix non-closing admonition block in oauth-tutorial.mdx (#8920) 2023-10-22 22:07:28 +07:00
Balázs Orbán
d094c6f4d9 docs: fix providers docs 2023-10-20 17:30:12 -07:00
Balázs Orbán
c31a0e7aba fix(docs): correctly define module name 2023-10-20 17:30:04 -07:00
Balázs Orbán
1fb292c12b Merge branch 'main' of github.com:nextauthjs/next-auth 2023-10-20 17:23:41 -07:00
Thang Vu
7e8d49cc20 fix: css issue 2023-10-19 19:40:26 +07:00
Balázs Orbán
6850602a67 chore: match Hasura tsocnfig with other adapters 2023-10-18 11:46:35 -06:00
Thang Vu
32dbf5486c chore: update example 2023-10-18 21:13:27 +07:00
Balázs Orbán
1789fc9d56 chore: drop unused dep 2023-10-18 13:28:24 +02:00
Balázs Orbán
616221ee37 chore: drop fetch polyfill as we require Node.js 18 2023-10-18 13:25:57 +02:00
36 changed files with 589 additions and 326 deletions

View File

@@ -74,6 +74,9 @@ declare module "next-auth/jwt" {
} }
export const config = { export const config = {
theme: {
logo: "https://next-auth.js.org/img/logo/logo-sm.png",
},
providers: [ providers: [
Apple({ clientId: process.env.AUTH_APPLE_ID, clientSecret: process.env.AUTH_APPLE_SECRET }), Apple({ clientId: process.env.AUTH_APPLE_ID, clientSecret: process.env.AUTH_APPLE_SECRET }),
Atlassian({ clientId: process.env.AUTH_ATLASSIAN_ID, clientSecret: process.env.AUTH_ATLASSIAN_SECRET }), Atlassian({ clientId: process.env.AUTH_ATLASSIAN_ID, clientSecret: process.env.AUTH_ATLASSIAN_SECRET }),

View File

@@ -23,7 +23,6 @@
"@solidjs/router": "^0.6.0", "@solidjs/router": "^0.6.0",
"solid-js": "^1.5.7", "solid-js": "^1.5.7",
"solid-start": "^0.2.9", "solid-start": "^0.2.9",
"undici": "5.11.0",
"zod": "^3.19.1" "zod": "^3.19.1"
}, },
"engines": { "engines": {

View File

@@ -8,7 +8,7 @@ const coreSrc = "../packages/core/src"
const providers = fs const providers = fs
.readdirSync(path.join(__dirname, coreSrc, "/providers")) .readdirSync(path.join(__dirname, coreSrc, "/providers"))
.filter((file) => file.endsWith(".ts")) .filter((file) => file.endsWith(".ts"))
.map((p) => `${coreSrc}/providers/${p}`) .map((p) => `providers/${p}`)
const typedocConfig = require("./typedoc.json") const typedocConfig = require("./typedoc.json")
// @ts-expect-error // @ts-expect-error
@@ -271,7 +271,7 @@ const docusaurusConfig = {
], ],
], ],
plugins: [ plugins: [
typedocFramework("core", ["index.ts", "adapters.ts", "errors.ts", "jwt.ts", "types.ts"]), typedocFramework("core", ["index.ts", "adapters.ts", "errors.ts", "jwt.ts", "types.ts"].concat(providers)),
typedocFramework("frameworks-sveltekit", ["lib/index.ts", "lib/client.ts"]), typedocFramework("frameworks-sveltekit", ["lib/index.ts", "lib/client.ts"]),
...(process.env.TYPEDOC_SKIP_ADAPTERS ...(process.env.TYPEDOC_SKIP_ADAPTERS
? [] ? []

View File

@@ -50,7 +50,7 @@
"engines": { "engines": {
"node": "^18.18.0 || ^20.8.0" "node": "^18.18.0 || ^20.8.0"
}, },
"packageManager": "pnpm@8.7.1", "packageManager": "pnpm@8.9.2",
"funding": [ "funding": [
{ {
"type": "github", "type": "github",

View File

@@ -1,6 +1,6 @@
{ {
"name": "@auth/azure-tables-adapter", "name": "@auth/azure-tables-adapter",
"version": "0.1.3", "version": "0.1.4",
"description": "Azure Tables Storage adapter for next-auth.", "description": "Azure Tables Storage adapter for next-auth.",
"homepage": "https://authjs.dev", "homepage": "https://authjs.dev",
"repository": "https://github.com/nextauthjs/next-auth", "repository": "https://github.com/nextauthjs/next-auth",

View File

@@ -1,6 +1,6 @@
{ {
"name": "@auth/d1-adapter", "name": "@auth/d1-adapter",
"version": "0.2.2", "version": "0.2.3",
"description": "A Cloudflare D1 adapter for Auth.js", "description": "A Cloudflare D1 adapter for Auth.js",
"homepage": "https://authjs.dev", "homepage": "https://authjs.dev",
"repository": "https://github.com/nextauthjs/next-auth", "repository": "https://github.com/nextauthjs/next-auth",

View File

@@ -1,6 +1,6 @@
{ {
"name": "@auth/dgraph-adapter", "name": "@auth/dgraph-adapter",
"version": "1.0.2", "version": "1.0.3",
"description": "Dgraph adapter for Auth.js", "description": "Dgraph adapter for Auth.js",
"homepage": "https://authjs.dev", "homepage": "https://authjs.dev",
"repository": "https://github.com/nextauthjs/next-auth", "repository": "https://github.com/nextauthjs/next-auth",
@@ -47,8 +47,7 @@
"@types/jsonwebtoken": "^8.5.5", "@types/jsonwebtoken": "^8.5.5",
"jest": "^27.4.3", "jest": "^27.4.3",
"ts-jest": "^27.0.3", "ts-jest": "^27.0.3",
"typescript": "5.2.2", "typescript": "5.2.2"
"undici": "5.22.1"
}, },
"dependencies": { "dependencies": {
"@auth/core": "workspace:*", "@auth/core": "workspace:*",

View File

@@ -7,8 +7,6 @@ import path from "path"
import type { DgraphClientParams } from "../src" import type { DgraphClientParams } from "../src"
globalThis.fetch ??= require("undici").fetch
const params: DgraphClientParams = { const params: DgraphClientParams = {
endpoint: "http://localhost:8080/graphql", endpoint: "http://localhost:8080/graphql",
authToken: "test", authToken: "test",

View File

@@ -1,6 +1,6 @@
{ {
"name": "@auth/drizzle-adapter", "name": "@auth/drizzle-adapter",
"version": "0.3.4", "version": "0.3.5",
"description": "Drizzle adapter for Auth.js.", "description": "Drizzle adapter for Auth.js.",
"homepage": "https://authjs.dev", "homepage": "https://authjs.dev",
"repository": "https://github.com/nextauthjs/next-auth", "repository": "https://github.com/nextauthjs/next-auth",

View File

@@ -1,7 +1,7 @@
{ {
"name": "@auth/dynamodb-adapter", "name": "@auth/dynamodb-adapter",
"repository": "https://github.com/nextauthjs/next-auth", "repository": "https://github.com/nextauthjs/next-auth",
"version": "1.0.4", "version": "1.0.5",
"description": "AWS DynamoDB adapter for next-auth.", "description": "AWS DynamoDB adapter for next-auth.",
"keywords": [ "keywords": [
"next-auth", "next-auth",

View File

@@ -1,6 +1,6 @@
{ {
"name": "@auth/edgedb-adapter", "name": "@auth/edgedb-adapter",
"version": "0.2.2", "version": "0.2.3",
"description": "EdgeDB adapter for next-auth.", "description": "EdgeDB adapter for next-auth.",
"homepage": "https://authjs.dev", "homepage": "https://authjs.dev",
"repository": "https://github.com/nextauthjs/next-auth", "repository": "https://github.com/nextauthjs/next-auth",

View File

@@ -1,6 +1,6 @@
{ {
"name": "@auth/fauna-adapter", "name": "@auth/fauna-adapter",
"version": "1.0.2", "version": "1.0.3",
"description": "Fauna Adapter for Auth.js", "description": "Fauna Adapter for Auth.js",
"homepage": "https://authjs.dev", "homepage": "https://authjs.dev",
"repository": "https://github.com/nextauthjs/next-auth", "repository": "https://github.com/nextauthjs/next-auth",

View File

@@ -1,6 +1,6 @@
{ {
"name": "@auth/firebase-adapter", "name": "@auth/firebase-adapter",
"version": "1.0.2", "version": "1.0.3",
"description": "Firebase adapter for Auth.js", "description": "Firebase adapter for Auth.js",
"homepage": "https://authjs.dev", "homepage": "https://authjs.dev",
"repository": "https://github.com/nextauthjs/next-auth", "repository": "https://github.com/nextauthjs/next-auth",

View File

@@ -1,6 +1,6 @@
{ {
"name": "@auth/hasura-adapter", "name": "@auth/hasura-adapter",
"version": "0.2.3", "version": "0.2.4",
"description": "Hasura adapter for Auth.js.", "description": "Hasura adapter for Auth.js.",
"homepage": "https://authjs.dev", "homepage": "https://authjs.dev",
"repository": "https://github.com/nextauthjs/next-auth", "repository": "https://github.com/nextauthjs/next-auth",

View File

@@ -13,9 +13,13 @@
"strictNullChecks": true, "strictNullChecks": true,
"stripInternal": true, "stripInternal": true,
"declarationMap": true, "declarationMap": true,
"declaration": true, "declaration": true
"verbatimModuleSyntax": true
}, },
"include": ["src/**/*"], "include": [
"exclude": ["*.js", "*.d.ts"] "src/**/*"
],
"exclude": [
"*.js",
"*.d.ts",
]
} }

View File

@@ -1,6 +1,6 @@
{ {
"name": "@auth/kysely-adapter", "name": "@auth/kysely-adapter",
"version": "0.1.3", "version": "0.1.4",
"description": "Kysely adapter for Auth.js", "description": "Kysely adapter for Auth.js",
"homepage": "https://authjs.dev/reference/adapter/kysely", "homepage": "https://authjs.dev/reference/adapter/kysely",
"repository": "https://github.com/nextauthjs/next-auth", "repository": "https://github.com/nextauthjs/next-auth",

View File

@@ -1,6 +1,6 @@
{ {
"name": "@auth/mikro-orm-adapter", "name": "@auth/mikro-orm-adapter",
"version": "1.0.3", "version": "1.0.4",
"description": "MikroORM adapter for Auth.js", "description": "MikroORM adapter for Auth.js",
"homepage": "https://authjs.dev", "homepage": "https://authjs.dev",
"repository": "https://github.com/nextauthjs/next-auth", "repository": "https://github.com/nextauthjs/next-auth",

View File

@@ -1,6 +1,6 @@
{ {
"name": "@auth/mongodb-adapter", "name": "@auth/mongodb-adapter",
"version": "2.0.2", "version": "2.0.3",
"description": "MongoDB adapter for Auth.js", "description": "MongoDB adapter for Auth.js",
"homepage": "https://authjs.dev", "homepage": "https://authjs.dev",
"repository": "https://github.com/nextauthjs/next-auth", "repository": "https://github.com/nextauthjs/next-auth",

View File

@@ -1,6 +1,6 @@
{ {
"name": "@auth/neo4j-adapter", "name": "@auth/neo4j-adapter",
"version": "1.0.2", "version": "1.0.3",
"description": "neo4j adapter for Auth.js", "description": "neo4j adapter for Auth.js",
"homepage": "https://authjs.dev", "homepage": "https://authjs.dev",
"repository": "https://github.com/nextauthjs/next-auth", "repository": "https://github.com/nextauthjs/next-auth",

View File

@@ -1,6 +1,6 @@
{ {
"name": "@auth/pg-adapter", "name": "@auth/pg-adapter",
"version": "0.2.2", "version": "0.2.3",
"description": "Postgres adapter for next-auth.", "description": "Postgres adapter for next-auth.",
"homepage": "https://authjs.dev", "homepage": "https://authjs.dev",
"repository": "https://github.com/nextauthjs/next-auth", "repository": "https://github.com/nextauthjs/next-auth",

View File

@@ -1,6 +1,6 @@
{ {
"name": "@auth/pouchdb-adapter", "name": "@auth/pouchdb-adapter",
"version": "1.0.2", "version": "1.0.3",
"description": "PouchDB adapter for next-auth.", "description": "PouchDB adapter for next-auth.",
"homepage": "https://authjs.dev", "homepage": "https://authjs.dev",
"repository": "https://github.com/nextauthjs/next-auth", "repository": "https://github.com/nextauthjs/next-auth",

View File

@@ -1,6 +1,6 @@
{ {
"name": "@auth/prisma-adapter", "name": "@auth/prisma-adapter",
"version": "1.0.4", "version": "1.0.5",
"description": "Prisma adapter for Auth.js", "description": "Prisma adapter for Auth.js",
"homepage": "https://authjs.dev/reference/adapter/prisma", "homepage": "https://authjs.dev/reference/adapter/prisma",
"repository": "https://github.com/nextauthjs/next-auth", "repository": "https://github.com/nextauthjs/next-auth",

View File

@@ -1,6 +1,6 @@
{ {
"name": "@auth/sequelize-adapter", "name": "@auth/sequelize-adapter",
"version": "1.0.4", "version": "1.0.5",
"description": "Sequelize adapter for Auth.js", "description": "Sequelize adapter for Auth.js",
"homepage": "https://authjs.dev", "homepage": "https://authjs.dev",
"repository": "https://github.com/nextauthjs/next-auth", "repository": "https://github.com/nextauthjs/next-auth",

View File

@@ -1,6 +1,6 @@
{ {
"name": "@auth/supabase-adapter", "name": "@auth/supabase-adapter",
"version": "0.1.5", "version": "0.1.6",
"description": "Supabase adapter for Auth.js", "description": "Supabase adapter for Auth.js",
"homepage": "https://authjs.dev", "homepage": "https://authjs.dev",
"repository": "https://github.com/nextauthjs/next-auth", "repository": "https://github.com/nextauthjs/next-auth",

View File

@@ -1,6 +1,6 @@
{ {
"name": "@auth/surrealdb-adapter", "name": "@auth/surrealdb-adapter",
"version": "0.1.2", "version": "0.1.3",
"description": "SurrealDB adapter for next-auth.", "description": "SurrealDB adapter for next-auth.",
"homepage": "https://authjs.dev", "homepage": "https://authjs.dev",
"repository": "https://github.com/nextauthjs/next-auth", "repository": "https://github.com/nextauthjs/next-auth",

View File

@@ -1,6 +1,6 @@
{ {
"name": "@auth/typeorm-adapter", "name": "@auth/typeorm-adapter",
"version": "1.0.5", "version": "1.0.6",
"description": "TypeORM adapter for Auth.js.", "description": "TypeORM adapter for Auth.js.",
"homepage": "https://authjs.dev/reference/adapter/typeorm", "homepage": "https://authjs.dev/reference/adapter/typeorm",
"repository": "https://github.com/nextauthjs/next-auth", "repository": "https://github.com/nextauthjs/next-auth",

View File

@@ -1,6 +1,6 @@
{ {
"name": "@auth/upstash-redis-adapter", "name": "@auth/upstash-redis-adapter",
"version": "1.0.3", "version": "1.0.4",
"description": "Upstash adapter for Auth.js.", "description": "Upstash adapter for Auth.js.",
"homepage": "https://authjs.dev", "homepage": "https://authjs.dev",
"repository": "https://github.com/nextauthjs/next-auth", "repository": "https://github.com/nextauthjs/next-auth",

View File

@@ -1,6 +1,6 @@
{ {
"name": "@auth/xata-adapter", "name": "@auth/xata-adapter",
"version": "0.1.2", "version": "0.1.3",
"description": "Xata adapter for Auth.js", "description": "Xata adapter for Auth.js",
"homepage": "https://authjs.dev", "homepage": "https://authjs.dev",
"repository": "https://github.com/nextauthjs/next-auth", "repository": "https://github.com/nextauthjs/next-auth",

View File

@@ -1,6 +1,6 @@
{ {
"name": "@auth/core", "name": "@auth/core",
"version": "0.17.0", "version": "0.18.0",
"description": "Authentication for the Web.", "description": "Authentication for the Web.",
"keywords": [ "keywords": [
"authentication", "authentication",

View File

@@ -50,10 +50,7 @@
color: var(--provider-dark-color, var(--color-primary)); color: var(--provider-dark-color, var(--color-primary));
background-color: var(--provider-dark-bg, var(--color-background)); background-color: var(--provider-dark-bg, var(--color-background));
&:hover { &:hover {
background-color: var( background-color: var(--provider-dark-bg-hover, var(--color-background-hover)) !important;
--provider-dark-bg-hover,
var(--color-background-hover)
) !important;
} }
} }
#provider-logo { #provider-logo {
@@ -170,11 +167,6 @@ a.button {
background-color: var(--provider-bg-hover, var(--color-background-hover)); background-color: var(--provider-bg-hover, var(--color-background-hover));
cursor: pointer; cursor: pointer;
} }
/* &:focus {
outline: none;
border: 1px solid;
border-color: var(--color-info);
} */
&:active { &:active {
cursor: pointer; cursor: pointer;
} }
@@ -193,10 +185,7 @@ a.button {
width: 100%; width: 100%;
&:hover { &:hover {
background-color: var( background-color: var(--button-hover-bg, var(--color-info-hover)) !important;
--button-hover-bg,
var(--colo r-info-hover)
) !important;
} }
} }

View File

@@ -124,11 +124,11 @@ export async function session(params: {
} }
// Pass Session through to the session callback // Pass Session through to the session callback
// @ts-expect-error
const sessionPayload = await callbacks.session({ const sessionPayload = await callbacks.session({
// By default, only exposes a limited subset of information to the client // By default, only exposes a limited subset of information to the client
// as needed for presentation purposes (e.g. "you are logged in as..."). // as needed for presentation purposes (e.g. "you are logged in as...").
session: { session: {
// @ts-expect-error missing `id`.
user: { name: user.name, email: user.email, image: user.image }, user: { name: user.name, email: user.email, image: user.image },
expires: session.expires.toISOString(), expires: session.expires.toISOString(),
}, },

View File

@@ -6,7 +6,7 @@
* </a> * </a>
* </div> * </div>
* *
* @module providers/ClickUp * @module providers/click-up
*/ */
import type { OAuthConfig, OAuthUserConfig } from "./index.js" import type { OAuthConfig, OAuthUserConfig } from "./index.js"

View File

@@ -428,11 +428,7 @@ export interface PagesOptions {
type ISODateString = string type ISODateString = string
export interface DefaultSession { export interface DefaultSession {
user?: { user?: User
name?: string | null
email?: string | null
image?: string | null
}
expires: ISODateString expires: ISODateString
} }

View File

@@ -1,6 +1,6 @@
{ {
"name": "@auth/sveltekit", "name": "@auth/sveltekit",
"version": "0.3.10", "version": "0.3.11",
"description": "Authentication for SvelteKit.", "description": "Authentication for SvelteKit.",
"keywords": [ "keywords": [
"authentication", "authentication",

811
pnpm-lock.yaml generated

File diff suppressed because it is too large Load Diff