Skip to content

fix(auth): remove Depends from Request and fix parameter order#1482

Open
Rojankarki5656 wants to merge 2 commits into
TransformerOptimus:mainfrom
Rojankarki5656:fix/fastapi-request-dependency
Open

fix(auth): remove Depends from Request and fix parameter order#1482
Rojankarki5656 wants to merge 2 commits into
TransformerOptimus:mainfrom
Rojankarki5656:fix/fastapi-request-dependency

Conversation

@Rojankarki5656
Copy link
Copy Markdown

@Rojankarki5656 Rojankarki5656 commented Jan 22, 2026

Fix: FastAPI Request dependency issue (fix #)

This PR fixes an issue where FastAPI Request objects were not being properly injected as dependencies, causing authentication errors in the application.

Related Issues

Fixes #1471

Updated the auth.py file to properly handle FastAPI Request dependency injection.
Modified the function signature to correctly use Request as a dependency parameter
instead of passing it directly.

Test Plan

  • Started SuperAGI application locally using python main.py
  • Verified the application starts without errors
  • Tested authentication endpoints - confirmed Request object is properly injected
  • Accessed protected routes - authentication works correctly
  • No breaking changes observed in existing functionality

Type of change

  • Bug fix (non-breaking change which fixes an issue)

Checklist

  • My pull request is atomic and focuses on a single change.
  • I have read the contributing guide and my code conforms to the guidelines.
  • I have documented my changes clearly and comprehensively.
  • I have added the required tests.

TheMemeBanker pushed a commit to TheMemeBanker/SuperAGI that referenced this pull request Feb 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

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

1 participant