Backend & Mobile – OAuth Handling, Compatibility Rules, and UX Improvements#207
Merged
Conversation
…ompatibility rules
…ntication necessity
- Updated Service model to include `requiresOAuth` field. - Modified Service serialization and deserialization to handle `requiresOAuth`. - Adjusted ServiceConnectionsPage to sort and filter services based on OAuth requirement. - Enhanced CreateAppletPage to reset action and reaction configurations. - Introduced CompatibilityProvider for managing action-reaction compatibility rules. - Updated ConnectedServicesProvider to map service names to their OAuth tokens. - Refactored OAuthService to improve error handling and connection logic. - Implemented ServiceTokenMapper for resolving service names to OAuth tokens. - Enhanced ActionConfigCard and ServiceActionSelectorCard to filter reactions based on compatibility. - Updated tests to cover new `requiresOAuth` functionality in Service and related components.
…otfix--google-oauth2
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR enhances the mobile app with OAuth management improvements, compatibility filtering, and service metadata enhancements. The changes include adding a requiresOAuth field to services, implementing action-reaction compatibility filtering, adding SVG logo support, and improving OAuth callback handling.
- Added
requiresOAuthboolean field to Service model to eliminate reliance on hardcoded OAuth service checks - Implemented compatibility provider for dynamic action-reaction filtering based on backend rules
- Enhanced OAuth deep link handler with duplicate detection and better error handling for redirects
Reviewed Changes
Copilot reviewed 22 out of 23 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| mobile/lib/models/service.dart | Added requiresOAuth and logo fields to Service model |
| mobile/lib/services/service_catalog_service.dart | Updated service parsing to include requiresOAuth and logo from backend |
| mobile/lib/providers/compatibility_provider.dart | New provider for managing action-reaction compatibility rules |
| mobile/lib/widgets/create_applet/service_action_selector_card.dart | Added compatibility filtering for reactions based on selected trigger action |
| mobile/lib/utils/service_token_mapper.dart | New utility for mapping service names to OAuth token providers |
| mobile/lib/services/oauth_service.dart | Enhanced OAuth callback handling with redirect support and service token mapping |
| mobile/lib/utils/oauth_deep_link_handler.dart | Refactored to support both custom and HTTP schemes with duplicate prevention |
| mobile/lib/main.dart | Added compatibility provider initialization and duplicate deep link detection |
| mobile/lib/pages/service_connections_page.dart | Updated to use SVG logos and requiresOAuth field from service model |
| mobile/lib/widgets/service_card.dart | Added SVG logo support with fallback to icon |
| mobile/pubspec.yaml | Added flutter_svg dependency |
| backend/automations/serializers.py | Added requires_oauth field to AboutServiceSerializer |
| backend/automations/views.py | Added CompatibilityRulesView endpoint |
| mobile/android/app/src/main/AndroidManifest.xml | Added HTTP deep link handling for OAuth callbacks in emulator |
| mobile/test/*.dart | Updated all test files to include required requiresOAuth field |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…ompatibility checks
…prove error logging
…ation and remove unused OAuth logic
…otfix--google-oauth2
…hotfix--google-oauth2
maelemiel
commented
Nov 1, 2025
200a527 to
2486e49
Compare
…otfix--google-oauth2
Arkteus
approved these changes
Nov 2, 2025
Arkteus
added a commit
that referenced
this pull request
Nov 2, 2025
…auth2 Backend & Mobile – OAuth Handling, Compatibility Rules, and UX Improvements
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.
PR Title
Backend & Mobile – OAuth Handling, Compatibility Rules, and UX Improvements
Description
This pull request introduces several backend and mobile app changes to improve OAuth service handling, action-reaction compatibility, and user experience.
The main updates include:
Changes Made
Backend Enhancements
requires_oauthandlogofields to theAboutServiceSerializer, exposing whether a service requires OAuth and its logo via the API.The logic checks both direct OAuth providers and mapped services (e.g., gmail → google).
(Files:
backend/services/serializers.py,backend/services/views.py)/api/compatibility-rules/and correspondingCompatibilityRulesViewto return action-reaction compatibility rules, making it easier for clients to fetch valid combinations.(Files:
backend/compatibility/views.py,backend/compatibility/urls.py)Mobile App Improvements
Servicemodel to includerequiresOAuthandlogofields, using backend data instead of local mappings.Refactored UI logic to sort and display services based on these fields.
(Files:
mobile/lib/models/service.dart,mobile/lib/pages/service_list.dart, etc.)Added duplicate deep link filtering to prevent repeated processing.
(Files:
mobile/android/app/src/main/AndroidManifest.xml,mobile/lib/services/oauth_handler.dart)CompatibilityProviderto the mobile app, automatically loading compatibility rules at startup for use in applet creation and validation.(Files:
mobile/lib/providers/compatibility_provider.dart,mobile/lib/main.dart)(Files:
mobile/lib/pages/applet_creation_page.dart,mobile/lib/pages/service_connection_page.dart)How to Test
/api/services/and verifyrequires_oauthandlogoare correctly exposed/api/compatibility-rules/endpoint returns valid data