Skip to content

Commit

Permalink
Merge branch 'main' into chore/add-typedoc-config-for-template
Browse files Browse the repository at this point in the history
  • Loading branch information
k-taro56 authored Aug 24, 2024
2 parents 05f940d + e2cdbfb commit 3925578
Show file tree
Hide file tree
Showing 7 changed files with 20 additions and 4 deletions.
1 change: 1 addition & 0 deletions .github/ISSUE_TEMPLATE/2_bug_provider.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ body:
- "Discord"
- "Dribbble"
- "Dropbox"
- "Eventbrite"
- "EVE Online"
- "Facebook"
- "FACEIT"
Expand Down
3 changes: 2 additions & 1 deletion docs/pages/getting-started/adapters/prisma.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ DATABASE_URL=postgres://postgres:[email protected]:5432/db
```

### Configuration

To improve performance using `Prisma ORM`, we can set up the Prisma instance to ensure only one instance is created throughout the project and then import it from any file as needed. This approach avoids recreating instances of PrismaClient every time it is used. Finally, we can import the Prisma instance from the `auth.ts` file configuration.

```ts filename="prisma.ts"
Expand All @@ -35,7 +36,7 @@ const globalForPrisma = globalThis as unknown as { prisma: PrismaClient }

export const prisma = globalForPrisma.prisma || new PrismaClient()

if (process.env.NODE_ENV !== 'production') globalForPrisma.prisma = prisma
if (process.env.NODE_ENV !== "production") globalForPrisma.prisma = prisma
```

<Callout type="warning">
Expand Down
1 change: 1 addition & 0 deletions docs/pages/guides/role-based-access-control.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -310,6 +310,7 @@ export default async function Page() {
return <p>You are not authorized to view this page!</p>;
}
```

</Code.Next>
<Code.NextClient>
If you want to use the role on the client side, use the `useSession` hook. The `session.user.role` will contain the required role if you exposed it via the `session` callback.
Expand Down
1 change: 1 addition & 0 deletions docs/pages/reference/_meta.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ export default {
"nextjs": "next-auth",
sveltekit: "@auth/sveltekit",
express: "@auth/express",
qwik: "@auth/qwik",
"solid-start": "@auth/solid-start",
warnings: "Warnings",
errors: {
Expand Down
2 changes: 0 additions & 2 deletions docs/typedoc.config.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@ const frameworks = fs
.readdirSync(path.resolve(__dirname, "../packages"))
.filter((dir) => dir.startsWith("frameworks-"))
.filter((dir) => dir !== "frameworks-template")
// TODO: Fix Qwik Auth API Reference generation
.filter((dir) => dir !== "frameworks-qwik")
.map((dir) => `../packages/${dir}`)

frameworks.push("../packages/next-auth", "../packages/core")
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/providers/eventbrite.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
* @module providers/eventbrite
*/

import type { OAuthConfig, OAuthUserConfig } from "."
import type { OAuthConfig, OAuthUserConfig } from "./index.js"

/**
* @see https://www.eventbrite.com/platform/api#/reference/user/retrieve-your-user/retrieve-your-user
Expand Down
14 changes: 14 additions & 0 deletions packages/frameworks-qwik/typedoc.config.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
// @ts-check

/**
* @type {import('typedoc').TypeDocOptions & import('typedoc-plugin-markdown').MarkdownTheme}
*/
module.exports = {
entryPoints: ["src/index.ts"],
entryPointStrategy: "expand",
tsconfig: "./tsconfig.json",
entryModule: "@auth/qwik",
entryFileName: "../qwik.mdx",
includeVersion: true,
readme: 'none',
}

0 comments on commit 3925578

Please sign in to comment.