Enable password authentication as fallback method when Auth0 is missing#255
Merged
Enable password authentication as fallback method when Auth0 is missing#255
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This pull request implements fallback password authentication when Auth0 (social authentication) is missing or not configured. The changes span both the SDK and Gateway components, with the main focus on adding a middleware to gracefully handle missing social authentication configuration and updating allauth settings to enable password-based login.
Changes:
- Added
SocialAccountFallbackMiddlewareto catchSocialApp.DoesNotExistexceptions and redirect to password login - Updated allauth configuration to enable password authentication as a fallback method
- SDK: Added anyio dependency and converted file discovery to use async path operations for better async/await compatibility
- Multiple code quality improvements including simplifying ternary expressions and fixing logger imports
Reviewed changes
Copilot reviewed 28 out of 31 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| gateway/sds_gateway/middleware.py | New middleware to handle missing social authentication gracefully |
| gateway/sds_gateway/test_middleware.py | Comprehensive tests for the new middleware |
| gateway/config/settings/base.py | Updated allauth settings to enable password authentication |
| gateway/sds_gateway/users/context_processors.py | Added context variables for authentication method availability |
| sdk/src/spectrumx/api/uploads.py | Migrated file discovery to use anyio's AsyncPath for proper async operations |
| sdk/tests/test_uploads.py | Updated tests to use AnyioPath for async file operations |
| sdk/pyproject.toml | Added anyio[trio] dependency for async path operations |
| gateway/sds_gateway/api_methods/models.py | Fixed enum value and added cast for QuerySet type hints |
| gateway/sds_gateway/visualizations/models.py | Added File import for proper Django file handling |
| gateway/sds_gateway/api_methods/tasks.py | Standardized logger import naming |
| Various files | Code quality improvements (simplified ternary expressions, typo fixes) |
Files not reviewed (1)
- gateway/package-lock.json: Language not supported
Comments suppressed due to low confidence (1)
gateway/sds_gateway/api_methods/views/capture_endpoints.py:1139
- There's a typo in the log message: "conflictsfor" should be "conflicts for". Also, this debug log statement appears to be misplaced - it's at the beginning of the function but claims there are no conflicts before any checking has occurred.
log.debug(
"No channel and top_level_dir conflictsfor current user's DigitalRF captures."
)
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
klpoland
approved these changes
Feb 13, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Login route attempts to load the social sign-in, but in case there's no social app configured, instead of a 500 error it will serve the email + password login.
The redirect happens via a new middleware and the new behavior is covered by tests.