preview, staging, and production environments.
Each environment is protected by default. Use this guide when a browser, CI
check, or API client must reach a deployed environment.
Cloud environment access is separate from
security.auth.oidc. Use Cloud environment access for
deployment visibility and application authentication for end-user identity
inside the app. A protected preview URL can require both gates.
Check a protected environment
Open the environment URL in a browser signed in as a project member. A protected environment serves the request when it carries that member’s session in theauthToken cookie.
To inspect an unauthenticated response, probe a route the project serves:
302 sign-in redirect. The sign-in apex
depends on the host serving the environment:
*.veryfront.comredirects tohttps://veryfront.com/sign-in.*.preview.veryfront.orgredirects tohttps://veryfront.org/sign-in.
redirect_url. The session cookie is scoped to that
domain.
Authenticate a non-browser client
A non-browser client can still authenticate by sending theauthToken cookie
with a project member’s session token. Store that token as a secret and account
for its expiration.
VERYFRONT_API_TOKEN does not open a protected environment on its own. It
authenticates the CLI against the Cloud API, not requests to the deployed app.
Exchange it for an environment access token for the key owner instead. The gate
accepts it for five minutes, and the Cloud API refuses it as a session.
veryfront deploy performs this exchange to probe the environment it
deployed. Use veryfront env token to mint the same bound credential for a
manual check or a later CI smoke test:
302 means the gate refused the token, not that the app
answered, and the comparison turns it into a failed job. The token lives five
minutes and an expired token is refused the same way, so mint it immediately
before the probe rather than once for a long suite. The token is bound to
the project and environment named in the exchange. A key scoped to another
project, or a key whose owner is not a member of the project gets a 403 at
the exchange. Human output contains only the token so command substitution can
capture it without placing the credential in shell history. With --json, read
the token from .data.access_token and its API-provided lifetime from
.data.expires_in.
Make an environment public
In Veryfront Studio:- Open Environments.
- Select the environment.
- Enable Public Environment.
- Confirm Make Public.
Verify it worked
Repeat the route probe:200 from
the environment root when the project has no static page at /.
See Deployment behavior for readiness and URL semantics.