Skip to content

Commit 492e953

Browse files
committed
Merge branch 'feat/add-a12n1' of github.com:curveball/next-auth into feat/add-a12n1
2 parents f19f8ae + 3f3ad2f commit 492e953

File tree

77 files changed

+661
-355
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

77 files changed

+661
-355
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ packages/next-auth/providers
3232
# copied from @auth/core
3333
packages/frameworks-*/**/providers
3434
packages/*/*.js
35+
!packages/*/typedoc.config.js
3536
packages/*/*.d.ts
3637
packages/*/*.d.ts.map
3738
packages/*/lib

README.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
> [!NOTE]
2+
> The Auth.js/NextAuth.js project is not provided by, nor otherwise affiliated with Vercel Inc. or its subsidiaries. Any contributions to this project by individuals affiliated with Vercel are made in their personal capacity.
3+
14
<p align="center">
25
<br/>
36
<a href="https://authjs.dev" target="_blank"><img width="96px" src="https://authjs.dev/img/logo-sm.png" /></a>
@@ -10,7 +13,7 @@
1013
<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>
1114
<!-- TODO: Should count `@auth/core` when NextAuth.js v5 is released as stable. -->
1215
<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>
13-
<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>
16+
<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>
1417
<!-- <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> -->
1518
<img src="https://shields.io/badge/TypeScript-3178C6?logo=TypeScript&logoColor=fff&style=flat-square" alt="TypeScript" />
1619
</p>

apps/dev/qwik/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ pnpm preview # or `pnpm preview`
5858

5959
## Production
6060

61-
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.
61+
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.
6262

6363
```shell
6464
pnpm build # or `pnpm build`

apps/examples/qwik/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ pnpm preview # or `pnpm preview`
5858

5959
## Production
6060

61-
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.
61+
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.
6262

6363
```shell
6464
pnpm build # or `pnpm build`

apps/examples/qwik/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545
"typescript": "5.4.5",
4646
"undici": "*",
4747
"vercel": "^29.1.1",
48-
"vite": "^5.2.10",
48+
"vite": "^5.4.12",
4949
"vite-tsconfig-paths": "^4.2.1"
5050
}
5151
}

apps/examples/solid-start/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
"solid-start-vercel": "^0.2.9",
1515
"tailwindcss": "^3.2.4",
1616
"typescript": "5.2.2",
17-
"vite": "^3.1.0"
17+
"vite": "^4.5.6"
1818
},
1919
"dependencies": {
2020
"@auth/solid-start": "latest",

docs/components/OAuthProviderInstructions/content/components/SetupCode.tsx

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@ import { Pre, Code as NXCode } from "nextra/components"
33
import { TSIcon } from "./TSIcon"
44

55
interface Props {
6-
providerName: string
6+
providerSymbol: string
77
providerId: string
88
highlight: (code: string) => string
99
}
1010

11-
export function SetupCode({ providerId, providerName, highlight }: Props) {
11+
export function SetupCode({ providerId, providerSymbol, highlight }: Props) {
1212
return (
1313
<Code>
1414
<Code.Next>
@@ -25,10 +25,10 @@ export function SetupCode({ providerId, providerName, highlight }: Props) {
2525
dangerouslySetInnerHTML={{
2626
__html: highlight(`
2727
import NextAuth from "next-auth"
28-
import ${providerName} from "next-auth/providers/${providerId}"
28+
import ${providerSymbol} from "next-auth/providers/${providerId}"
2929
3030
export const { handlers, signIn, signOut, auth } = NextAuth({
31-
providers: [${providerName}],
31+
providers: [${providerSymbol}],
3232
})`),
3333
}}
3434
/>
@@ -64,10 +64,10 @@ export const { GET, POST } = handlers
6464
dangerouslySetInnerHTML={{
6565
__html: highlight(`
6666
import { QwikAuth$ } from "@auth/qwik"
67-
import ${providerName} from "@auth/qwik/providers/${providerId}"
67+
import ${providerSymbol} from "@auth/qwik/providers/${providerId}"
6868
6969
export const { onRequest, useSession, useSignIn, useSignOut } = QwikAuth$({
70-
providers: [${providerName}],
70+
providers: [${providerSymbol}],
7171
}) `),
7272
}}
7373
/>
@@ -86,10 +86,10 @@ export const { onRequest, useSession, useSignIn, useSignOut } = QwikAuth$({
8686
dangerouslySetInnerHTML={{
8787
__html: highlight(`
8888
import { SvelteKitAuth } from "@auth/sveltekit"
89-
import ${providerName} from "@auth/sveltekit/providers/${providerId}"
89+
import ${providerSymbol} from "@auth/sveltekit/providers/${providerId}"
9090
9191
export const { handle, signIn } = SvelteKitAuth({
92-
providers: [${providerName}],
92+
providers: [${providerSymbol}],
9393
}) `),
9494
}}
9595
/>
@@ -145,14 +145,14 @@ export const load: LayoutServerLoad = async (event) => {
145145
dangerouslySetInnerHTML={{
146146
__html: highlight(`
147147
import { ExpressAuth } from "@auth/express"
148-
import ${providerName} from "@auth/express/providers/${providerId}"
148+
import ${providerSymbol} from "@auth/express/providers/${providerId}"
149149
import express from "express"
150150
151151
const app = express()
152152
153153
// If app is served through a proxy, trust the proxy to allow HTTPS protocol to be detected
154154
app.set('trust proxy', true)
155-
app.use("/auth/*", ExpressAuth({ providers: [ ${providerName} ] }))
155+
app.use("/auth/*", ExpressAuth({ providers: [ ${providerSymbol} ] }))
156156
`),
157157
}}
158158
/>

docs/components/OAuthProviderInstructions/content/index.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ export function OAuthInstructions({ providerId, disabled = false }: Props) {
3838
}
3939

4040
const providerName = manifest.providersOAuth[providerId]
41+
const providerSymbol = providerName.replace(/\s+/g, "")
4142
const envVars = [
4243
`AUTH_${providerId.toUpperCase().replace(/-/gi, "_")}_ID={CLIENT_ID}`,
4344
`AUTH_${providerId.toUpperCase().replace(/-/gi, "_")}_SECRET={CLIENT_SECRET}`,
@@ -205,7 +206,7 @@ export function OAuthInstructions({ providerId, disabled = false }: Props) {
205206
</p>
206207
<SetupCode
207208
providerId={providerId}
208-
providerName={providerName}
209+
providerSymbol={providerSymbol}
209210
highlight={highlight}
210211
/>
211212
{/* Step 4 */}

docs/next.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ export default withNextra({
7272
{
7373
source: "/:path(.*)",
7474
has: [{ type: "host", value: "warnings.authjs.dev" }],
75-
destination: "https://authjs.dev/reference/warnings/:path*",
75+
destination: "https://authjs.dev/reference/core/types#warningcode",
7676
permanent: true,
7777
},
7878
{

docs/package.json

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@
1111
"start": "next start",
1212
"lint": "eslint ./{components,pages,utils}",
1313
"lint:fix": "eslint ./{components,pages,utils} --fix",
14-
"build:sitemap": "next-sitemap --config next-sitemap.config.cjs"
14+
"build:sitemap": "next-sitemap --config next-sitemap.config.cjs",
15+
"clean": "rm -rf .next build pages/reference/*.mdx pages/reference/**/*"
1516
},
1617
"repository": {
1718
"type": "git",
@@ -49,8 +50,9 @@
4950
"postcss": "^8.4.47",
5051
"shiki": "^1.22.0",
5152
"tailwindcss": "^3.4.13",
52-
"typedoc": "^0.25.13",
53-
"typedoc-plugin-markdown": "4.0.0-next.54",
54-
"typedoc-plugin-mdn-links": "^3.3.2"
53+
"typedoc": "^0.27.6",
54+
"typedoc-plugin-markdown": "4.3.3",
55+
"typedoc-plugin-mdn-links": "4.0.11",
56+
"typedoc-plugin-no-inherit": "^1.5.0"
5557
}
5658
}

0 commit comments

Comments
 (0)