Passwords have been the cornerstone of all authentication methods since the 60’s. And as the internet grew we have tried to patch up it’s security flaws with password policies, multi factor authentication, password managers, and hardware devices.
Users simply have to many passwords, and it is hard to keep up with them.
What if there was a better way, a way that let you sign in without passwords, with much higher security and much better user experience?
Passkeys is the solution that holds this promise and in this article we will go through how passkeys work, why passkeys are more secure, whether passkeys can be hacked, and how to implement passkeys .
Passkeys is developed by the FIDO alliance, and is an authentication method designed to eliminate the need for passwords, providing a seamless login experience without compromising security. Rather than relying on a string of characters (like a password), passkeys use asymmetric cryptography, aka public-key cryptography to authenticate users.
Here’s how it works:
In simpler terms, a passkey eliminates the need to remember passwords and instead relies on cryptographic keys, ensuring secure and user-friendly authentication.
Passkeys can be synced across between your mobile device and laptop by using a password manager like apple keychain, google password manager or 1password. And you can also have them on one single device which is the most secure option. When you have them on a single device you will use the same authentication method you used to sign up with.
Passkeys are more secure than traditional passwords because they rely on something you have instead of something you know.
Thus, passkeys offer a significant improvement in security compared to passwords, which can be guessed, leaked, or hacked.
Passkeys are a novel technology and no system is bulletproof, However, it is much more resilient to hacking than traditional passwords.
Here's why:
An attacker would need to go through many layers of security to steal a single password. They would need to compromise or steal a device and then bypass the device level security like biometrics, multi-factor authentication or encryption.
Attacking at scale and compromising thousands of passwords is extremely difficult. However a theoretical possibility exists if password managers are used to sync passkeys across devices
The password authentication protocol typically involves the user sending a username and password to the server, which then checks it against a stored hash. If the password is correct, the user is authenticated. However, this authentication process is vulnerable to various attacks, such as:
Throughout the years, passwords have been patched by making users create more complicated passwords and add multi factor authentication to the process. Although reducing the user experience the improvements have increased the security, however, when a hacker steals a password, the damage is done at scale. They either breach a whole database or if they get access to one of your single passwords the chances are that you reuse it throughout many of your other applications.
In contrast, by using public-key cryptography in passkeys. The server never stores sensitive user credentials (like passwords); instead, it stores the user’s public key, which can only be verified with the corresponding private key stored on the user’s device. The public key does not need to be secure. The private key is however stored securely on your device and works only for one specific service, and can only be used when combined with biometric or device based authentication.
At this point we hope you feel that passkeys is the future and that you wish to implement it for your service.
Implementing passkeys on a website requires integrating WebAuthn, and we have a guide for you in this article where you learn how to implement passkeys in NextJs with real code examples.
You might know this but Passkey as a concept has been around for a while. The new thing is that with FIDO 2 it now supports browsers and not just hardware which makes it much more accessible. Better
security, better user experience and no more of passwords. Sounds like a fantastic future, so go ahead and support passkeys in your application right away.
If you wish to explore more about authentication have a look at our article about different authentication methods and how to master signup systems