Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow for setting public routes #1730

Merged
merged 2 commits into from
Dec 25, 2024
Merged

Allow for setting public routes #1730

merged 2 commits into from
Dec 25, 2024

Conversation

NolanTrem
Copy link
Collaborator

@NolanTrem NolanTrem commented Dec 25, 2024

Dependency on and checks within the auth provider were too rigid and didn't make sense for endpoints that must be publicly available. This allows for marking routes as public.


Important

Add support for public routes in auth_wrapper and mark request-password-reset as public in users_router.py.

  • Behavior:
    • Add public parameter to auth_wrapper in auth.py to allow public routes.
    • Update request-password-reset endpoint in users_router.py to be public.
  • Functions:
    • Modify auth_wrapper in auth.py to handle public routes.
  • Endpoints:
    • Mark /users/request-password-reset in users_router.py as public.
  • Misc:
    • Update auth_wrapper usage in base_router.py, chunks_router.py, and collections_router.py to accommodate public parameter.

This description was created by Ellipsis for 3a5174e. It will automatically update as commits are pushed.

Copy link
Contributor

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 Looks good to me! Reviewed everything up to 59a3c8e in 59 seconds

More details
  • Looked at 186 lines of code in 2 files
  • Skipped 0 files when reviewing.
  • Skipped posting 2 drafted comments based on config settings.
1. py/core/base/providers/auth.py:119
  • Draft comment:
    The auth_wrapper function was changed from async to returning an async function. Ensure that all usages of auth_wrapper correctly await the returned function, as this change affects how the function is called.
  • Reason this comment was not posted:
    Comment did not seem useful.
2. py/core/main/api/v3/users_router.py:526
  • Draft comment:
    Ensure that the public parameter in auth_wrapper is correctly set for all routes that should be public. This change allows for public routes, and it's important to verify that it's used correctly across the codebase.
  • Reason this comment was not posted:
    Comment did not seem useful.

Workflow ID: wflow_NZFuOXpvTHCsQXcd


You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet mode, and more.

Copy link
Contributor

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 Looks good to me! Incremental review on 3a5174e in 38 seconds

More details
  • Looked at 864 lines of code in 11 files
  • Skipped 0 files when reviewing.
  • Skipped posting 1 drafted comments based on config settings.
1. py/core/main/api/v3/users_router.py:106
  • Draft comment:
    The auth_wrapper function should accept a public parameter to allow marking routes as public. Ensure the function signature in auth.py is updated accordingly.
  • Reason this comment was not posted:
    Comment did not seem useful.

Workflow ID: wflow_6US1z93pBxacwWa2


You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet mode, and more.

@NolanTrem NolanTrem merged commit eb36272 into main Dec 25, 2024
14 checks passed
@NolanTrem NolanTrem deleted the Nolan/PublicRoutes branch December 25, 2024 17:49
blahmountain added a commit to blahmountain/R2R that referenced this pull request Dec 26, 2024
Allow for setting public routes (SciPhi-AI#1730)
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.

1 participant