Skip to main content
Credential rotation lets you replace the passkey bound to your wallet while you still have access to the current one. It is a proactive operation — you choose to rotate because you got a new phone, you are retiring an old device, or you want to practice good security hygiene. Rotation is distinct from account recovery: rotation requires your current credential to authorize the change, while recovery is for situations where that credential is already lost.

Rotation vs Recovery

The two operations look superficially similar but serve different purposes and follow different authorization paths:
If you have already lost access to your passkey, use account recovery instead. Credential rotation cannot proceed without the current credential.

What Rotation Guarantees

The wallet contract’s rotate_passkey() operation provides a hard guarantee: only the bound credential changes. The entire rest of the wallet state is untouched. Before rotation:
After rotation:

The Rotation Flow

1

Authenticate

The user authenticates with their current passkey. This proves they still control the wallet and authorizes the rotation request.
2

Generate New Credential

The user creates a new passkey on the target device — the one they want to use going forward. The new passkey produces a public key and credential ID that will replace the current binding.
3

Proof of Possession

The new passkey must prove it actually controls the private key it claims to have. SocketFi issues a challenge, the new passkey signs it, and the signature is verified before the rotation can proceed. This step prevents an attacker from injecting a credential they do not control.
4

Rotation Authorized

The current passkey signs an authorization message that includes the new credential’s public key, the wallet’s current nonce, and an expiration window. This binds the current owner’s approval to the specific new credential being registered.
5

Wallet Updated

The wallet contract verifies the authorization (current credential signature, nonce, expiration) and the proof of possession (new credential’s challenge response). Both must pass. If they do, the passkey rotation executes and the new credential becomes the active binding.

When to Rotate

Getting a new device

Rotate before you wipe or dispose of your old device. Authenticate on the old device, register the new passkey, rotate — then the old device’s passkey no longer controls the wallet.

Security policy compliance

Organizations that require periodic credential refresh can implement a rotation schedule without migrating assets or changing wallet addresses.

Migrating passkey providers

Moving from a hardware security key to a platform passkey (or vice versa) is a rotation — same wallet, new credential.

Proactive security

If you suspect your passkey may have been compromised but you still have access, rotate immediately rather than waiting for unauthorized activity.

Rotation Failure Scenarios

Rotation can fail at three points:
If rotation fails after you have already set up the new passkey but before it was bound to the wallet, your current passkey is still active. You can retry rotation as many times as needed while your current credential remains valid.

Application Integration

Surface credential rotation in your application’s account or security settings so users can proactively manage their credentials before they lose access:
Notify users by email or push notification when a credential rotation completes. Unexpected rotation notifications are an important signal that their account may be compromised.