We had originally planned to go all-in on passkeys for ONCE/Campfire, and we built the early authentication system entirely around that. It was not a simple setup! Handling passkeys properly is surprisingly complicated on the backend, but we got it done. Unfortunately, the user experience kinda sucked, so we ended up ripping it all out...
Passkeys are basically passwords that you don’t send to the server. So they are safer against phishing.
Basically the server has a message. They will scramble it with your public key. And send it to you. Your private key unscrambles the message and then you send the message back to them. So if they receive the original message back. They know you are you. And they never got their hands on your private key at any point. It’s awesome.
2fa is an entirely different thing. And I do wish it was more standard how it works. Some places if you lose it you lose your account (bitwarden). Others you don’t (protonmail).
Everyone should use passkeys. 2fa you have to decide if your case warrants it.
Edit: example of passkeys:
Step 1: they have the message “cat”
Step 2: they encrypt it with your public key and it becomes “acm”
Step 3: they send you the encrypted message “acm”
Step 4: you decrypt the message “acm” into “cat” with your private key.
Step 5: you send them back the message “cat”
Only your private key would be able to decrypt something encrypted with your public key. So they now know you are you. And they never got a hand on your private key. It’s the same as a password except you never send it directly to the server.
Passkeys are basically passwords that you don’t send to the server. So they are safer against phishing.
Basically the server has a message. They will scramble it with your public key. And send it to you. Your private key unscrambles the message and then you send the message back to them. So if they receive the original message back. They know you are you. And they never got their hands on your private key at any point. It’s awesome.
2fa is an entirely different thing. And I do wish it was more standard how it works. Some places if you lose it you lose your account (bitwarden). Others you don’t (protonmail).
Everyone should use passkeys. 2fa you have to decide if your case warrants it.
Edit: example of passkeys:
Step 1: they have the message “cat” Step 2: they encrypt it with your public key and it becomes “acm” Step 3: they send you the encrypted message “acm” Step 4: you decrypt the message “acm” into “cat” with your private key. Step 5: you send them back the message “cat”
Only your private key would be able to decrypt something encrypted with your public key. So they now know you are you. And they never got a hand on your private key. It’s the same as a password except you never send it directly to the server.