Skip to content

shouldShowBypassAuthButton()

@blobs/sdk v0.1.0


@blobs/sdk / utils/environment / shouldShowBypassAuthButton

shouldShowBypassAuthButton(): boolean

Defined in: utils/environment.ts:180

Decide whether to render the dev-mode “bypass auth” button.

Rules:

  1. If BLOBS_BYPASS_AUTH_BUTTON is "true", always show.
  2. If BLOBS_BYPASS_AUTH_BUTTON is "false", never show.
  3. Otherwise, show only when running on a localhost-style host.

Reads from import.meta.env (Vite) or process.env (Node-style).

Returns

boolean

True if the bypass-auth UI should be rendered.