I have been playing with passkeys inside Home Assistant this weekend and it seems not that hard to implement. But can’t do this alone.
First of all, I’ve opened an discussion at Add Passkey as alternative authentication method · home-assistant/architecture · Discussion #1001 · GitHub, but discussions are not feature requests. Then I found this topic .
Also: I actually have no idea what I am doing. I would be the last to ask about security and authentication. But I love to learn new things and see how it works. That’s why I looked up “How to implement passkeys” and get to work.
It would be cool to have this added, but this would be a bit to big of a project for ‘just me’. And I am sure there are quite some ideas already.
Is it possible?
My preliminary answer is yes, of course. Here are my findings:
- Implementing the frontend on the web is possible. I’ve tested generating keys, and it works nicely.
- I’ve used the example code from GoogleChromeLabs/passkeys-demo and some documentation from https://webauthn.io and integrated it into Home Assistant.
- Implementing this in the apps should be possible, but it’s unknown how difficult it would be.
- The backend uses Python, and there is a well-maintained Python library that can be used. I’ve tested this, and it works as expected.
What have I done so far.
See the PR below. I’ve added the minimum to allow generating passkeys. I’ve hacked in without known what I actually knowing what I am doing just to get it to work.
So, if you have any ideas or know where to help, feel free to ping me!
Edit: Due some personal events I am unable to continue this project in the near future. Feel free to pick where I left.