Put the sign-in variables in .env
auth_env_to_fileWrite Neon Auth environment variables into a project .env file without exposing the cookie secret, preserving other entries, and returning only the written variable names.
Instructions
Write NEON_AUTH_BASE_URL, NEON_AUTH_COOKIE_SECRET, NEON_AUTH_JWKS_URL and VITE_NEON_AUTH_URL into a .env file in the project directory, and return only the names of what was written. The cookie secret goes into the file and never into this conversation, so do not read the file back out to the user. These are the same variables the deployed app receives, so do not copy them into set_env. Variables already in the file are replaced, everything else is kept, and the file is added to .gitignore. Sign-in has to exist first: auth_create makes it. Needs the account token that login (or https://antideploy.com/agent.md) saves on this machine: a project key cannot read the secret.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| file | No | A .env file inside the project directory. Default .env; .env.local suits Next.js. | |
| directory | No | The project folder. Defaults to this server's working directory. |