"Magic Link" Signer
Magic Link Signer
To successfully test and utilize the Magic Link functionality, you need to clone and run a local signer app that processes the signature requests. The magic link will redirect to this app, allowing you to sign transactions or token swaps.
Steps to Set Up the Magic Link Signer App
Clone the Signer App Repository: Clone the repository that contains the
signer app:
Install Dependencies: Navigate into the cloned directory and install the required dependencies:
Run the Signer App: Start the app using the following command:
This will start the signer app locally on
http://localhost:5173
.Pass the Provider in the Client Library: In the client library configuration, you need to pass this local signer app as the provider in the options:
Magic Link Redirection: When you generate a magic link for actions such as sending transactions or swapping tokens, it will redirect the user to this signer app (
http://localhost:5173
). The developer can customize this app to handle various signing operations or UI changes as per their project requirements.
Example Magic Link Response
Here’s how the response looks with a magic link:
In this case, the magic link will redirect to http://localhost:5173
, where the signer app will display the details of the transaction for the user to approve or reject.
Customizing the Signer App
The developer can further customize the signer app by modifying the cloned repository to:
Add custom branding.
Implement additional validation.
Modify the signing flow according to specific use cases.
By running the app locally, the developer can see the magic link redirect in action and tweak the behavior to suit their project.
Last updated