Skip to content

ImportError and incorrect Depends usage for Request in helper/auth.py #1471

@Raihan2511

Description

@Raihan2511

There is an import error and incorrect use of FastAPI's Depends in superagi/helper/auth.py.

Request is used without importing it from fastapi.

Request is incorrectly wrapped in Depends(), which raises an AssertionError on startup.

This prevents the backend from starting in Docker.

Suggested fix:

  • Add from fastapi import Request to the imports.
  • Change the function signature to use request: Request without Depends().

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