Skip to content

Remove legacy Auth0 code and configuration #1289

@harry-rhesis

Description

@harry-rhesis

Summary

Remove all legacy Auth0 code, configuration, and database columns now that native authentication is fully implemented.

Background / Context

The native authentication system has replaced Auth0. Legacy Auth0 compatibility is still present behind the AUTH_LEGACY_AUTH0_ENABLED flag. Per the migration reference, this code should be removed once all users have migrated. The /auth/demo endpoint is excluded from this issue and handled separately.

Deliverables

Backend:

  • Remove auth0_id column from User model and create an Alembic migration to drop it
  • Remove _legacy_auth0_callback() function from routers/auth.py
  • Remove GET /auth/login legacy endpoint
  • Remove auth/oauth.py module (Auth0 authlib OAuth setup)
  • Remove AUTH_LEGACY_AUTH0_ENABLED env var and all related conditional logic
  • Remove AUTH0_DOMAIN env var references
  • Remove authlib dependency if no longer used elsewhere

Frontend:

  • Remove any Auth0-related callback or redirect handling
  • Clean up environment variables referencing Auth0

Infrastructure / Config:

  • Remove Auth0 secrets and env vars from deployment configs

Acceptance Criteria

  • No references to auth0 remain in the codebase (except migration history and demo endpoint)
  • AUTH_LEGACY_AUTH0_ENABLED flag and all gated code paths are removed
  • auth0_id column dropped via Alembic migration
  • All auth flows continue to work without legacy code
  • Existing tests pass; legacy-specific tests updated or removed

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions