OAuth login with Webauthn not working in Webview
Description:
We set up Rocket with external OAuth using Keycloak. When Keycloak is configured for second factor authentication using Webauthn, authentication fails with the Rocket native Android app.
Environment Information:
- Rocket.Chat Server Version: 6.8.0
- Rocket.Chat App Version: 4.48.0 and 4.49.0
- Device Name: Pixel 6a
- OS Version: Android 14
Steps to reproduce:
- Setup a keycloak instance, see e.g. https://www.keycloak.org/getting-started/getting-started-docker
- Setup rocket chat with keycloak, see https://docs.rocket.chat/use-rocket.chat/authentication/saml/keycloak
- Configure webauthn. see e.g. https://keycloak.ch/keycloak-tutorials/tutorial-webauthn/
- On the phone visit https://
/realms/ /account/#/security/signingin and click "Set up security Key" -> Register and add the phone as a second factor. - Open Rocket Android app and enter the workspace name.
- Click on "Continue with Keycloak Login"
- Provide credentials to Keycloak
- Try WebAuthn Authenticator as second factor
Expected behavior:
WebAuthn should work. When I log in with Chrome on the same phone I am asked for the screen pin and the phone successfully authenticates using WebAuthn with Keycloak.
Actual behavior:
Response "Failed to authenticate by the Security Key" from Keycloak.
Probably the reason is that Android Webview does not support webauthn, see https://groups.google.com/a/chromium.org/g/blink-dev/c/qCJhuuZH5p0 .
Additional context:
The best would be to open external OAuth authentification links using the device browser instead of opening them inside the app. Most other apps when configured with OIC or OAuth follow this approach.
Hey. We have plans to make it possible to make login on external browsers which would add support to physical security keys to all services (we did it to Google already https://github.com/RocketChat/Rocket.Chat.ReactNative/issues/2703 https://github.com/RocketChat/Rocket.Chat.ReactNative/issues/2284), but we can't do it right now, sadly. There are more important items atm.
That's a shame. Rocket.Chat is the last service we have that doesn't work nicely with Passkeys, and the only reason we still have to support TOTPs for MFA, so we'd love to see that change at some point.
Do you have any idea when you'll get around to it? Any sort of roadmap, or is it purely "we'll get around to it eventually, hopefully"? (It's understandable if it's the latter, though obviously I'm hoping for something more concrete.)
Hey @KramNamez
Unfortunately, the answer is that we'll get around to it eventually.
We are currently focused on closing accessibility gaps and new end-to-end encryption requirements on mobile.
Fair enough - those are both pretty obviously huge and important topics too. Fingers crossed that you get around to it shortly after those :)
Any Update on this?
Any news here?
This is also an issue for me and it would be nice to have any updates on this. We use AWS Cognito as OAuth provider with passkeys and our users are always confused that it does not work.