Interested in integrating with Key-Rex?
Here’s a clear guide with the steps to integrate Key-Rex Bitcoin Lightning Authentication into your website.
1. Get a Lightning Wallet
If you don’t have one yet, download a compatible Lightning wallet app. This is what you’ll use to create your Key-Rex account and what your visitors will use to sign in.
2. Create Your Key-Rex Account
Go to keyrex.co and sign in with your Lightning wallet. It’s fast, passwordless, and creates your account instantly.
3. Enter Your Domain
Tell Key-Rex the domain (website address) where you’ll be using the authentication.
4. Accept the Disclaimer and Get Your Site ID
Review the quick disclaimer, accept it, and you’ll receive your unique site ID plus the integration code right away (available in your dashboard).
5. Add the Frontend Code
Embed the Key-Rex login button on your website by adding these two lines to your HTML - check website for code
(Replace `YOUR_SITE_ID` with the one from your dashboard.)
6. Set Up Backend Callback Handling
Your backend (or a simple serverless function on Vercel, AWS, etc.) needs to receive the authentication callback. It gets a secure cryptographic proof like `{ "xpub": "xpub_..." }`. Use this to create a user session and redirect the user after login.
Full working examples for different languages and frameworks are provided in your Key-Rex dashboard.
7. Test and Go Live
Test the login flow on your site. Users will see a simple “Sign in with Lightning” button, connect their wallet, and log in instantly with no passwords or emails collected.
That’s it.
Head over to
https://keyrex.co to get started right now. ⚡️₿