fix(sync): implement OAuth redirect for Dropbox on mobile

- Add redirect_uri parameter to OAuth flow for mobile platforms
- Create OAuthCallbackHandlerService to handle deep link callbacks
- Register custom URI scheme (com.super-productivity.app://) in Android/iOS
- Add platform-specific UI for OAuth flow (automatic vs manual)
- Implement proper error handling for OAuth callback errors
- Add comprehensive unit tests for callback handler
- Fix memory leak by properly cleaning up event listeners
- Use IS_NATIVE_PLATFORM constant for consistent platform detection

Web/Electron continue using manual code entry (no regression).
Mobile (iOS/Android) now use automatic redirect with deep linking.

Fixes Dropbox OAuth authentication on iOS and Android platforms.
This commit is contained in:
Johannes Millan 2026-01-20 20:19:34 +01:00
parent 524e9888a5
commit 40b18c4693
12 changed files with 318 additions and 32 deletions

View file

@ -52,5 +52,16 @@
<string>fetch</string>
<string>remote-notification</string>
</array>
<key>CFBundleURLTypes</key>
<array>
<dict>
<key>CFBundleURLSchemes</key>
<array>
<string>com.super-productivity.app</string>
</array>
<key>CFBundleURLName</key>
<string>OAuth Callback</string>
</dict>
</array>
</dict>
</plist>