A minimal demo showing two QRAuth features in a single page:
- Sign in with QRAuth — QR-based passwordless authentication
- Verified QR Codes — Cryptographically signed QR codes with tamper-proof verification
Live demo: demo.qrauth.io
git clone https://github.com/qrauth-io/example-integration.git
cd example-integration
npm installCreate a .env file with your QRAuth credentials:
QRAUTH_API_KEY=qrauth_...
QRAUTH_CLIENT_ID=qrauth_app_...
QRAUTH_CLIENT_SECRET=qrauth_secret_...
npm start
# Open http://localhost:3000<script src="https://qrauth.io/sdk/qrauth-auth.js"></script>
<script>
new QRAuth({
clientId: 'qrauth_app_xxx',
element: '#login',
onSuccess: (result) => {
// result.sessionId + result.signature
// Send to your backend to verify
},
});
</script>The backend verifies the session:
const result = await qrauth.verifyAuthResult(sessionId, signature);
if (result.valid) {
const { email, name } = result.session.user;
// Issue your own JWT / session
}const qr = await qrauth.create({
destination: 'https://your-site.com/page',
expiresIn: '30d',
});
// qr.verification_url → https://qrauth.io/v/xK9m2pQ7
// Scanning shows: org identity, trust score, signature proofserver.js — Fastify backend (~90 lines)
public/index.html — Single-page frontend (vanilla JS, no build step)
.env.example — Required environment variables
No database. No migrations. No build step.
- Node.js:
@qrauth/node - Python:
qrauth - Browser: Load from CDN (
https://qrauth.io/sdk/qrauth-auth.js)
MIT