Skip to content

Add env-gated local auth bypass for development #844

@marcusschiesser

Description

@marcusschiesser

Problem

Local development currently requires a valid Better Auth session before most authenticated routes and pages can be used. This makes it harder to test app behavior locally when OAuth is not configured or when you want to work without signing in through Vercel/GitHub.

Desired behavior

Add a development-only auth bypass that can be explicitly enabled with an environment variable.

When enabled:

  • the app should provide a local fallback authenticated user if no Better Auth session exists

When disabled:

  • the app should behave exactly as it does today
  • no fallback session should be created

Proposed solution

Introduce an env-gated auth bypass, for example:

  • AUTH_BYPASS=true enables the fallback session
  • AUTH_BYPASS=false or unset keeps the feature off

This branch is implementing such a behavior:

https://github.com/vercel-labs/open-agents/compare/main...marcusschiesser:open-agents:auth-bypass-upstream?expand=1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions