Repository navigation
Conversation
apps/web is Auth.js's SvelteKit example (nextauthjs/sveltekit-auth-example, ISC, © 2022-2024 Balázs Orbán; the licence is apps/web/LICENSE) on SvelteKit 2.60.1 and Svelte 5, built by @sveltejs/adapter-cloudflare into one Worker with Static Assets. @auth/sveltekit is pinned at 1.11.3, and upstream's cookie@0 override is carried in pnpm-workspace.yaml. - The example's pages, header, footer and actions. Its 26 providers are in src/server/providers.ts, and each is registered only when every key it takes is set. The configuration is built per request from the Worker's bindings. - A /signin page lists the connected providers, or says that none is connected and which keys connect each one. - Sessions are Auth.js's JWT cookies. There is no database. - tooling/wire/worker-secrets.mjs runs in the deploy lane's build. It lists the secrets the Worker carries, generates AUTH_SECRET only if there is none, and refuses to mint when the list fails. It pushes AUTH_SECRET and any provider keys that are set with `wrangler secret bulk` over stdin. `pnpm secret:dev` runs the same step against apps/web/.env. - The smoke is read-only: `/` must render and /auth/session must answer null. Checks: typecheck, lint, 18 unit tests and the build are green, and `wrangler deploy --dry-run` reports 702 KiB, 162 KiB gzipped. Under `wrangler dev`, with no secret /auth/session fails. With a secret, every page renders. With GitHub keys, signing in reaches GitHub's authorize URL. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019PcpNVpFBcbeiX3EHdXfmn
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
The auth app (SU-2).
apps/webis Auth.js's SvelteKit example on SvelteKit 2.60.1 and Svelte 5, built by@sveltejs/adapter-cloudflareinto one Worker with Static Assets. The upstream licence is ISC, © 2022-2024 Balázs Orbán, and ships asapps/web/LICENSE.signin/signoutactions.@auth/sveltekitis pinned at 1.11.3, and upstream'scookie@0 → 0.7.0override is carried over.src/server/providers.ts. Each one is registered only when every key it takes is set. The config is lazy,SvelteKitAuth(async (event) => …), and reads the Worker's bindings first./signin: shows a button for each connected provider. With none connected, it says so, lists GitHub's keys, and gives every provider's keys.tooling/wire/worker-secrets.mjsruns in the deploy lane's build.wrangler secret bulkover stdin.AUTH_*variable is unset forvite build.pnpm secret:devwrites AUTH_SECRET intoapps/web/.env, upstream's local file./must render</html>, and/auth/sessionmust answernull. Only a Worker that has its AUTH_SECRET answers it that way.Checks
wrangler.wrangler deploy --dry-runreports 702 KiB, 162 KiB gzipped.wrangler dev:/auth/sessionfails.planjob only, while the workspace is the placeholder.Generated by Claude Code