Skip to content

FIDO: Add Bluetooth connection#3194

Open
DaVinci9196 wants to merge 8 commits intomicrog:masterfrom
DaVinci9196:passkey_scan_code
Open

FIDO: Add Bluetooth connection#3194
DaVinci9196 wants to merge 8 commits intomicrog:masterfrom
DaVinci9196:passkey_scan_code

Conversation

@DaVinci9196
Copy link
Contributor

@DaVinci9196 DaVinci9196 commented Dec 17, 2025

FIDO adds cross-device (Bluetooth) login.
Scene 1: Log in to local applications using other device keys by scanning the local device's QR code.
Scene 2: Scan the key QR code on another device using the Google App to log in using your device's key.

@mar-v-in mar-v-in added this to the 0.3.13 milestone Dec 23, 2025
@ale5000-git
Copy link
Member

ale5000-git commented Jan 28, 2026

@DaVinci9196
I'll throw out an idea for a possible extension if you have the time and inclination:
Scene 3: Scan the key QR code on another device from microG settings (withOUT using the Google App) to log in using your device's key.

Copy link
Member

@mar-v-in mar-v-in left a comment

Choose a reason for hiding this comment

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

It seems you are wildly mixing different things here:

import kotlin.also
import kotlin.text.lowercase

class QRBounceActivity : AppCompatActivity() {
Copy link
Member

Choose a reason for hiding this comment

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

What's the purpose of this activity? Why not just directly launch HybridAuthenticateActivity when it's needed?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The initial idea was to have a transition page, with HybridAuthenticateActivity not directly accessible externally. It can also be removed.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Removed

return
}
val targetIntent = Intent()
targetIntent.setClassName(this, "org.microg.gms.fido.core.ui.hybrid.HybridAuthenticateActivity")
Copy link
Member

Choose a reason for hiding this comment

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

Please reference directly the class (via HybridAuthenticateActivity::class.java) rather than by name.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Removed

Copy link
Member

Choose a reason for hiding this comment

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

You shouldn't do any changes to this file, this is from mlkit and is entirely unrelated to fido.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Reverted


override fun onCreateOptionsMenu(menu: Menu, inflater: MenuInflater) {
menu.add(0, MENU_GAMES_MANAGED, 0, org.microg.gms.base.core.R.string.menu_game_managed)
menu.add(0, MENU_SCAN_FIDO_QR_CODE, 0, org.microg.gms.base.core.R.string.menu_qr_code_scan)
Copy link
Member

Choose a reason for hiding this comment

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

I don't think Google has such a menu option either. The documentation also suggests that the QR code is scanned using the regular camera app, not using Google settings app. Please make it work using the regular flow, no need to have a custom QR code reader button in microG.

Copy link
Member

Choose a reason for hiding this comment

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

Not all camera apps support QR codes (specially on old Android), so it would be nice to have the possibility to make it working without having to install an additional app.

Copy link
Member

Choose a reason for hiding this comment

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

@ale5000-git using FIDO hybrid passkeys is unrelated to Google accounts and this shouldn't be buried in some Google account-related setting.

People with a camera app that can't scan QR codes are well-adviced to have another way to scan QR codes anyway, or how would one be able to scan QR codes that are not application-specific, like just regular web links?

Copy link
Member

Choose a reason for hiding this comment

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

@mar-v-in
My opinion is that a not application-specific QR code can be useful but not fundamental so on old phones it is perfectly possible to not have generic QR code app but still it would be useful to still use FIDO hybrid passkeys.

If the code isn't too big I think it is very useful to have it.

As for "shouldn't be buried in some Google account-related setting", it could be moved to a better place (but without requiring a separate app if possible).

Copy link
Member

Choose a reason for hiding this comment

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

microG isn't a user-facing app. The only launcher is microG settings, which intentionally can be disabled/hidden for users that prefer to reach it from system settings or when custom ROMs have a tight integration. If we wanted to have a new user-facing launcher, what else would be in it other than this QR scanner? Having an additional microG launcher with just a QR code scanner wouldn't really make sense, users could just install a QR code scanner app then.

Copy link
Member

@ale5000-git ale5000-git Feb 27, 2026

Choose a reason for hiding this comment

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

@mar-v-in
Even if the microG settings aren't in the launcher, they still are integrated in Android settings so it is fine (in my opinion).
My idea is to have a special "FIDO" section inside microG settings that open a separate page that contains the QR code scanning function (and maybe in the future the possibility to list and delete the FIDO screen lock credentials).

}

class AuthenticatorGetInfoRequest : Ctap2Request(0x04)
class AuthenticatorGetInfoRequest(
Copy link
Member

Choose a reason for hiding this comment

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

authenticatorGetInfo does not take any inputs, see https://fidoalliance.org/specs/fido-v2.3-rd-20251023/fido-client-to-authenticator-protocol-v2.3-rd-20251023.html#authenticatorGetInfo
The structure here looks like you actually wanted to use the outputs, that is the AuthenticatorGetInfoResponse class below.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It has been changed to use AuthenticatorGetInfoResponse

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