Gate wasp-auth-only codegen behind the provider and expose the active provider identity - #4728
Conversation
Deploying wasp-docs-on-main with
|
| Latest commit: |
8a8b213
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://209d4a61.wasp-docs-on-main.pages.dev |
| Branch Preview URL: | https://franjo-auth2-5-capability-ga.wasp-docs-on-main.pages.dev |
f6de499 to
2adb557
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: |
2adb557 to
7b2a0fd
Compare
7b2a0fd to
436d435
Compare
|
The |
436d435 to
12dab02
Compare
| } | ||
|
|
||
| if ( | ||
| manifestCapabilities.includes('issue-sessions') && |
There was a problem hiding this comment.
Let's rewrite this so it kinda collects errors instead.
E.g. it will check for each optional property we have and check if it implements if it declared, then at end just dump all errors we collected.
12dab02 to
7f0a0d5
Compare
|
Boot assert updated for the mixin contract: the |
7f0a0d5 to
8a8b213
Compare
|
Review fix applied: |
8a8b213 to
32ca2f6
Compare
… provider identity
32ca2f6 to
8760f0c
Compare
|
Dropped the |
|
This pull request is now stale. Next steps if the PR is still relevant, and you are able to devote time to it:
If no action is taken, this PR will be automatically closed in 7 days. |
Description
Stack 5/7. The negative space: under an external provider, Wasp's own auth surface disappears instead of lying around.
isWaspAuthUsedgating: auth forms, per-method client modules, lucia/password/jwt server modules, their sdkpackage.jsonexports and npm deps are generated only underwaspAuth(). Importing them under an external provider is a compile error, not a runtime surprise.JWT_SECRETis required only under wasp auth; instead, the manifest's declared env vars are rendered into the generated zod env schemas, so a missingCLERK_SECRET_KEYfails at boot with the adapter's own doc string as the error message.wasp/auth/provideridentity module:authProviderIdandcapabilitiesas narrowable literals.userSignupFieldsfrom the manifest feeds JIT provisioning throughvalidateAndGetUserFields(a purely additive extension of 4/7'sresolveExternalSubject).One caveat, stated openly: the external-provider branch gets its end-to-end golden proof in 7/7, where the snapshot test lands together with the packaged Clerk fixture in its final form (landing it here would mean rewriting a 167-file golden dir one PR later).
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.