Skip to content

feat: Add 2FA support - #686

Draft
LouisCAD wants to merge 7 commits into
mainfrom
2fa
Draft

feat: Add 2FA support#686
LouisCAD wants to merge 7 commits into
mainfrom
2fa

Conversation

@LouisCAD

Copy link
Copy Markdown
Contributor

Add support for two factor authentication.

Copilot AI balanced review requested due to automatic review settings August 13, 2026 15:18
@LouisCAD
LouisCAD enabled auto-merge August 13, 2026 15:18
@sonarqubecloud

Copy link
Copy Markdown

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Adds Android-side 2FA approval support using Infomaniak Core and Firebase Cloud Messaging.

Changes:

  • Adds 2FA approval UI and dependency injection.
  • Registers devices and handles 2FA push notifications.
  • Configures Firebase, notification channels, and dependencies.

Reviewed changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
NotificationsUtils.kt Adds the 2FA notification channel.
MainApplication.kt Starts notification registration and cleanup integration.
MainActivity.kt Displays the 2FA approval sheet.
SwissTransferFirebaseMessagingService.kt Handles FCM tokens and 2FA messages.
RegisterUserDeviceWorker.kt Registers enabled notification topics.
ApplicationModule.kt Provides the 2FA manager.
AndroidManifest.xml Registers the Firebase messaging service.
google-services.json Adds Firebase project configuration.
app/build.gradle.kts Adds Google Services, Firebase, and 2FA dependencies.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread app/google-services.json
"client_info": {
"mobilesdk_app_id": "1:890863238862:android:d6eadefaa2c25f7ffc5a9f",
"android_client_info": {
"package_name": "com.infomaniak.swisstransfer"
configureSentry()

userDataCleanableList = listOf<AssociatedUserDataCleanable>(DeviceInfoUpdateManager)
userDataCleanableList = listOf(DeviceInfoUpdateManager, NotificationsRegistrationManager)
Comment thread app/build.gradle.kts
implementation(core.splitties.toast)
implementation(core.splitties.preferences)
implementation(core.okhttp)
implementation(core.firebase.messaging.ktx)
val appSettings by myAccountViewModel.appSettingsFlow.collectAsStateWithLifecycle(initialValue = null)
val isInDarkTheme = isDarkTheme(getTheme = { appSettings?.theme })

TwoFactorAuthApprovalAutoManagedBottomSheet(twoFactorAuthManager, isInDarkTheme = isInDarkTheme)
@LouisCAD
LouisCAD disabled auto-merge August 13, 2026 15:30
@LouisCAD
LouisCAD marked this pull request as draft August 13, 2026 15:30
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.

3 participants