Skip to main content
The useAddAuthMethod hook lets a user add a passkey, password, or PIN that encrypts their key share on their device. New users’ key shares are kept in Para’s secure enclave, so they don’t need one of these to unlock their wallet. For a user whose share is in the enclave, useAddAuthMethod moves the share out of the enclave to the user’s device, protected by the new credential. The exception is a user whose existing passkey, password, or PIN already serves as a login second factor: their share stays in the enclave.
To ask for a passkey, password, or authenticator app at sign-in, use Login Two-Factor Authentication instead. You turn it on in the Developer Portal, and Para runs the setup and verification on its own pages. useAddAuthMethod doesn’t add a login second factor.

When to Use This

Use this when a user wants their key share protected on their own device by a passkey, password, or PIN they control. To make sign-in itself stronger, for example to require a second factor or meet an enterprise requirement, use Login Two-Factor Authentication instead.

Add a Passkey

Users can add a passkey to their account:

Add a Password

Users can add a traditional password to their account:

Add a PIN

For a simpler upgrade, users can add a PIN:

Handling the Popup

By default, useAddAuthMethod opens a popup window for the user to complete the auth method setup. You can control this behavior:

Adding Two-Factor Authentication (2FA)

To require a second factor at every sign-in, see .

API Reference

For complete hook details, parameters, and return types, see the hook reference.