One-Click Auth
One-Click Auth represents a key advancement within WalletConnect v2, streamlining the user authentication process in AppKit by enabling them to seamlessly connect with a wallet and sign a SIWE message with just one click. Connecting a wallet, proving control of an address with an off-chain signature, authorizing specific actions. These are the kinds of authorizations that can be encoded as “ReCaps”. ReCaps are permissions for a specific website or dapp that can be compactly encoded as a long string in the message you sign and translated by any wallet into a straight-forward one-sentence summary. WalletConnect uses permissions expressed as ReCaps to enable a One-Click Authentication.Configure your AppKit Client
To integrate SIWE with AppKit, you need to configure your AppKit client usingModal.Model.AuthPayloadParams
, which are required to create a SIWE message for the user to sign:
Example of AuthRequestParams
onSessionAuthenticateResponse
callback from AppKit.ModalDelegate
:
Fallback to SIWE Over Session Request
If the wallet connecting to your dapp does not support One-Click Auth, the SDK will fallback to thewc_sessionPropose
method and create a session with the wallet. AppKit will then inform the user that they need to sign a message to prove address ownership. AppKit will send a SIWE request to the wallet, and once the wallet responds with a signed message, use onSIWEAuthenticationResponse
callback to check the result:
Link Mode
The latest release of AppKit supports link mode, a low latency mechanism for transporting One-Click Auth requests and session requests over universal links, reducing the need for a WebSocket connection with the Relay. This significantly enhances the user experience when connecting native dApps to native wallets by reducing the latency associated with networking connections, especially when the user has an unstable internet connection.appLink
with a valid universal link and set the linkMode
property to true
:
autoVerify
set to true
: