Add @wasp.sh/auth-clerk and @wasp.sh/auth-better-auth adapter packages and switch the examples to them - #4730
Conversation
77edf55 to
d2fcbd5
Compare
@wasp.sh/spec
@wasp.sh/wasp-cli
@wasp.sh/wasp-cli-darwin-arm64-unknown
@wasp.sh/wasp-cli-darwin-x64-unknown
@wasp.sh/wasp-cli-linux-arm64-glibc
@wasp.sh/wasp-cli-linux-x64-glibc
@wasp.sh/wasp-cli-linux-x64-musl
commit: |
d2fcbd5 to
7574f24
Compare
|
Both adapter packages updated for the #4725 contract refactors: |
7574f24 to
ac5ca2d
Compare
|
Both package adapters now annotate their providers as |
ac5ca2d to
b798be7
Compare
b798be7 to
3827d37
Compare
|
Adapters now annotate by intersection ( |
3827d37 to
e728351
Compare
…s and switch the examples to them
e728351 to
93ee5d2
Compare
Deploying wasp-docs-on-main with
|
| Latest commit: |
93ee5d2
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://c13e97e0.wasp-docs-on-main.pages.dev |
| Branch Preview URL: | https://franjo-auth2-7-adapter-packa.wasp-docs-on-main.pages.dev |
|
Rebased onto the new client-adapter PR (#4732). The Clerk package now implements |
Description
Stack 7/7. The payoff: two real adapter packages, and the example apps switch to them.
examples/auth-providers/packages/auth-clerkandauth-better-auth:/specentries are zero-import manifest helpers (clerk(),betterAuth()),/serverentries implementcreateServerAdapter, Clerk's/clientshipsClerkAuthProvider+useClerkWaspSessionBridgeas plain React exports. Committeddist/exists for thefile:deps — skip it in review, along with lockfiles and the golden dir.clerkapp's server-side integration collapses toprovider: clerk(); its client side is a 5-line composition inApp.tsx. Thebetter-authapp drops its hand-declared routes for the manifest'sroutes(mounted at/better-auth, raw body), gainssetup.tsviasetupFn(default-or-explicit semantics), and keeps only its Prisma models — a manifest cannot contribute schema.custom-clerkis untouched: diffing it againstclerknow shows exactly what an adapter package absorbs (~80 lines of adapter + client bridge → one spec helper call).AuthProviderExternalSnapshotTestsnapshots the packaged Clerk app — the golden proof that an external-provider app generates no auth forms, no lucia/jwt/password modules, noJWT_SECRETrequirement, and does get the identity module and the manifest's env vars in its env schemas.With this, the whole stack's thesis is on the table: adopting an external provider costs an app a one-line spec helper plus its login page, and
context.usernever changes meaning.Type of change
Checklist
I tested my change in a Wasp app to verify that it works as intended.
🧪 Tests and apps:
examples/kitchen-sink/e2e-tests.waspc/data/Cli/templates, as needed.examples/, as needed.examples/tutorials) I updated the tutorial in the docs (and vice versa).📜 Documentation:
web/docs/.🆕 Changelog: (if change is more than just code/docs improvement)
waspc/ChangeLog.mdwith a user-friendly description of the change.web/docs/migration-guides/.versioninwaspc/waspc.cabalto reflect the changes I introduced.