GmsCore
GmsCore copied to clipboard
USB Fido2: PIN not requested if plugged after method selected
Describe the bug If the USB key is plugged after selecting the "Use security key with USB" option, the PIN in not requested. But if the key is plugged before selecting the option, the PIN is correctly requested.
cf. https://codeberg.org/s1m/hw-fido2-provider/issues/2
ping @TheMartinizer because you have implemented it
To Reproduce Steps to reproduce the behavior:
- Login with a passkey
- Click on 'Use security key with USB'
- Plug the USB key
Expected behavior The PIN should be requested
Screenshots A silent error happens, and the screen doesn't return
2025-05-02 18:04:37.258 5790-5790 FidoUsbHandler s1m.hwfido2provider W org.microg.gms.fido.core.MissingPinException
at org.microg.gms.fido.core.transport.TransportHandler.sign$play_services_fido_core_release(TransportHandler.kt:480)
at org.microg.gms.fido.core.transport.usb.UsbTransportHandler$sign$2.invokeSuspend(UsbTransportHandler.kt:106)
at org.microg.gms.fido.core.transport.usb.UsbTransportHandler$sign$2.invoke(Unknown Source:8)
at org.microg.gms.fido.core.transport.usb.UsbTransportHandler$sign$2.invoke(Unknown Source:4)
at org.microg.gms.fido.core.transport.usb.ctaphid.CtapHidConnection.open(CtapHidConnection.kt:180)
at org.microg.gms.fido.core.transport.usb.ctaphid.CtapHidConnection$open$2.invokeSuspend(Unknown Source:15)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
at kotlinx.coroutines.internal.ScopeCoroutine.afterResume(Scopes.kt:32)
at kotlinx.coroutines.AbstractCoroutine.resumeWith(AbstractCoroutine.kt:102)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:46)
at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:108)
at androidx.lifecycle.DispatchQueue.drainQueue(DispatchQueue.kt:74)
at androidx.lifecycle.DispatchQueue.enqueue(DispatchQueue.kt:111)
at androidx.lifecycle.DispatchQueue.dispatchAndEnqueue$lambda$2$lambda$1(DispatchQueue.kt:99)
at androidx.lifecycle.DispatchQueue.$r8$lambda$QTUwShsnwO8ux11W0m-zm9OKBq8(Unknown Source:0)
at androidx.lifecycle.DispatchQueue$$ExternalSyntheticLambda0.run(D8$$SyntheticClass:0)
at android.os.Handler.handleCallback(Handler.java:991)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loopOnce(Looper.java:232)
at android.os.Looper.loop(Looper.java:317)
at android.app.ActivityThread.main(ActivityThread.java:8973)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:591)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:927)
System Android Version: 15 Custom ROM: GrapheneOS 15
Additional context
fido-core lib is used by https://codeberg.org/s1m/hw-fido2-provider, not microg directly.