-
-
Notifications
You must be signed in to change notification settings - Fork 38
doc: migrate more auth guide to v3 #511
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
WalkthroughAdds/edits documentation in v3.x auth integration: updates Better-Auth examples to use an auth-enabled ORM client ( Changes
Sequence Diagram(s)sequenceDiagram
autonumber
actor Client
participant Server
participant AuthService as Auth Service
participant AuthDB as authDb (ORM w/ access policy)
Client->>Server: Request (authenticated)
Server->>AuthService: retrieve session / current user
AuthService-->>Server: user { id, role, ... }
note right of Server `#DDEBF7`: create user-bound ORM client
Server->>AuthDB: authDb.$setAuth({ userId, role, ... })
AuthDB-->>Server: auth-enabled client ready
Server->>AuthDB: perform DB operations (enforced by access policies)
AuthDB-->>Server: query/mutation results
Server-->>Client: response
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes
Possibly related PRs
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ Finishing touches🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (3)
versioned_docs/version-3.x/recipe/auth-integration/better-auth.md(5 hunks)versioned_docs/version-3.x/recipe/auth-integration/clerk.md(1 hunks)versioned_docs/version-3.x/recipe/auth-integration/custom.md(1 hunks)
🧰 Additional context used
🪛 markdownlint-cli2 (0.18.1)
versioned_docs/version-3.x/recipe/auth-integration/clerk.md
11-11: Heading levels should only increment by one level at a time
Expected: h2; Actual: h3
(MD001, heading-increment)
🔇 Additional comments (5)
versioned_docs/version-3.x/recipe/auth-integration/custom.md (1)
1-59: Custom auth guide is well-structured and complete.versioned_docs/version-3.x/recipe/auth-integration/clerk.md (1)
1-9: Clerk integration guide is comprehensive and clear.The documentation properly covers setup, schema configuration, and the user-bound ORM client creation pattern with clear code examples for Next.js.
versioned_docs/version-3.x/recipe/auth-integration/better-auth.md (3)
3-3: Metadata update is appropriate.
29-31: Import comment and pattern are clear.The clarifying comment for the auth-enabled ORM client and the shift to
authDbimport align with the v3 migration pattern shown in the other auth integration guides.
85-89: Consistent migration to user-bound ORM pattern.Both code examples properly switch from
db.$setAuth()toauthDb.$setAuth(), maintaining consistency with the new authentication integration approach across all guides.Also applies to: 120-121
Summary by CodeRabbit