feat: bridge Better Auth UI to BTST v3 providers - #19
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 8b29096deb
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| body: getPermissionBody( | ||
| params, | ||
| permissionProvider === "organization" | ||
| ) |
There was a problem hiding this comment.
Include the identity in server admin permission checks
When permissionProvider is "admin", Better Auth's server-side userHasPermission API needs the user being checked (normally userId: params.identity.id, or an explicit role) in the request body. This call only sends permissions, despite already requiring params.identity, so documented server configurations using the admin provider will have their authorization checks rejected or fail closed rather than evaluate that user's permissions.
Useful? React with 👍 / 👎.
Summary
StackProviderservicesSecurity behavior
permissionProvideror a customcanmapping is explicitly configuredScope
The upstream standalone
AuthUIProviderand auth/account/organization UI components are unchanged.createResource,useForm, anduseListStateare not introduced because Better Auth already owns these form/query flows and there is no corresponding BTST resource/list seam to adapt.Verification
pnpm test(65 tests)pnpm buildpnpm lint(pre-existing warnings only)cd docs && pnpm build(68 static pages)/client, and/serverdeclarations expose the intended provider factoriesCloses #17