Skip to content

Commit

Permalink
chore(docs): update docusaurus homepage sveltekit example (#10205)
Browse files Browse the repository at this point in the history
  • Loading branch information
ndom91 authored Mar 3, 2024
1 parent 72ba83c commit 0168f3c
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions docs/src/pages/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -277,17 +277,21 @@ export default function Home() {
}

const svelteKitCode = `
// src/auth.ts
import { SvelteKitAuth } from "@auth/sveltekit"
import GitHub from '@auth/sveltekit/providers/github'
import { GITHUB_ID, GITHUB_SECRET } from "$env/static/private"
export const handle = SvelteKitAuth({
export const { handle } = SvelteKitAuth({
providers: [
GitHub({
clientId: GITHUB_ID,
clientSecret: GITHUB_SECRET
})
],
})
// src/hooks.server.ts
export { handle } from "./auth"
`.trim()

const solidStartCode = `import { SolidAuth } from "@auth/solid-start"
Expand All @@ -310,8 +314,8 @@ export const { auth, handlers } = NextAuth({ providers: [ GitHub ] })
// middleware.ts
export { auth as default } from "auth"
// app/api/auth/[...nextauth].ts
// app/api/auth/[...nextauth]/route.ts
import { handlers } from "auth"
export const { GET, POST } = handlers
export const runtime = "edge"
export const runtime = "edge" // Optional
`.trim()

0 comments on commit 0168f3c

Please sign in to comment.