Skip to content

Commit c82bc0a

Browse files
committed
update
1 parent 0365a5c commit c82bc0a

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

  • versioned_docs/version-3.x/recipe/auth-integration

versioned_docs/version-3.x/recipe/auth-integration/clerk.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,11 @@ sidebar_label: Clerk
88

99
[Clerk](https://clerk.com/) is a comprehensive authentication and user management platform, providing both APIs and pre-made UI components. This guide will show you how to integrate Clerk with ZenStack's [access control system](../../orm/access-control/).
1010

11-
### Set up Clerk
11+
## Set up Clerk
1212

1313
First, follow Clerk's [quick start guides](https://clerk.com/docs/quickstarts/overview) to set up your project if you haven't already.
1414

15-
### Adjust your ZModel
15+
## Adjust your ZModel
1616

1717
Since Clerk manages both user authentication and storage, you don't need to store users in your database anymore. However, you still need to provide a type that the `auth()` function can resolve to. Instead of using a regular model, we can declare a `type` instead:
1818

@@ -45,7 +45,7 @@ model Post {
4545

4646
If you choose to [synchronize user data to your database](https://clerk.com/docs/users/sync-data-to-your-backend), you can define `User` as a regular `model` since it's then backed by a database table.
4747

48-
### Create a user-bound ORM client
48+
## Create a user-bound ORM client
4949

5050
When using ZenStack's built-in access control, you often use the `auth()` function in policy rules to reference the current user's identity. The evaluation of `auth()` at runtime requires you to call the `$setAuth()` method and pass in the validated user identity from Clerk.
5151

0 commit comments

Comments
 (0)