Skip to content
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

auth.js tries to import $env/dynamic/private in SvelteKit frontend #11166

Open
ssebastianoo opened this issue Jun 14, 2024 · 0 comments
Open
Labels
bug Something isn't working triage Unseen or unconfirmed by a maintainer yet. Provide extra information in the meantime.

Comments

@ssebastianoo
Copy link

Environment

 System:
    OS: macOS 15.0
    CPU: (8) arm64 Apple M2
    Memory: 103.59 MB / 8.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 20.9.0 - /usr/local/bin/node
    Yarn: 1.22.21 - /usr/local/bin/yarn
    npm: 10.5.1 - /usr/local/bin/npm
    pnpm: 9.0.3 - /usr/local/bin/pnpm
    bun: 1.1.12 - ~/.bun/bin/bun
  Browsers:
    Chrome: 126.0.6478.61
    Safari: 18.0
  npmPackages:
    @auth/sveltekit: ^1.2.0 => 1.2.0 

Reproduction URL

https://github.com/ssebastianoo/SelfStats/blob/authjs-bug/src/routes/signin/%2Bpage.svelte

Describe the issue

When trying to set up a custom sign in page the authjs library for SvelteKit tries, for some reason, to import { env } from "$env/dynamic/private"; in the client, breaking the whole app

image

image

How to reproduce

Add a custom login page following the docs

Expected behavior

$env/dynamic/private shouldn't be imported on the client

@ssebastianoo ssebastianoo added bug Something isn't working triage Unseen or unconfirmed by a maintainer yet. Provide extra information in the meantime. labels Jun 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working triage Unseen or unconfirmed by a maintainer yet. Provide extra information in the meantime.
Projects
None yet
Development

No branches or pull requests

1 participant