Building Auth-Enabled QR Code Apps with Release0 (QR Bolt Case Study)
•
5 minutes read

QR Bolt isn’t just a QR code generator — it’s a smart, user-aware agent that remembers users, stores their content, and provides dynamic features using Release0 blocks. In this blog, we’ll dissect how it combines authentication, data persistence, and multi-channel delivery in a seamless experience.
🧠 What Makes QR Bolt Special?
QR Bolt demonstrates a high-level use of Release0’s stack by offering:
- Google Sign-In (OAuth 2.0) with session handling
- Persistent vs. Guest sessions with fallback logic
- Cloud storage via Google Sheets
- Multi-channel QR delivery: chat image, email, and direct download
- Client-side scripting for token handling and URL encoding
👥 Two Flows: Logged-in vs. Guest
🔐 Sign in with Google
- User authenticates via Google OAuth.
- Their QR code is saved in Google Sheets.
- They receive it by email.
- On next visit, the saved QR auto-loads.
🧪 Continue as Guest
- Skips login for speed.
- QR is generated instantly.
- No save or email — only instant download.
This dual flow ensures the best of both UX worlds: speed and persistence.
🔗 Google OAuth 2.0 Integration
The agent constructs the Google login URL dynamically using a Set Variable block with isCode: true
. It uses:
client_id
redirect_uri
scope=email profile
response_type=code
Then it Redirects the user to Google.
Once redirected back, it processes the code
URL parameter:
- Sends it to Google's token API using a Webhook Block
- Decodes the returned
id_token
using a JavaScript function (decodeIdToken
) to extract the user email and name
This entire flow happens without leaving the Release0 agent. It’s 100% front-end.
Thanks to Uladzimir (UKarpuk) for his contributions on the Google Auth code.
📦 Persistent User Data with Sheets
For logged-in users, QR Bolt saves their QR code metadata in a Google Sheet:
- Image URL
- Timestamp
The next time the user logs in, the agent uses Get data from sheet to find their last QR, and shows it automatically.
🖼️ Multi-Channel Delivery
When a QR code is generated:
- It’s shown immediately in the chat
- It’s emailed as an image attachment
- It’s opened in a new tab via a Redirect block for download
🧠 Code-Like Block Logic
buildGoogleAuthURL()
A Set Variable block assembles the Google login URL with:
_10const base = "https://accounts.google.com/o/oauth2/v2/auth";_10const redirect = encodeURIComponent(window.location.href);_10return `${base}?client_id=xxx&redirect_uri=${redirect}&scope=email%20profile&response_type=code`;
decodeIdToken()
Another Set Variable block decodes the JWT to extract profile info:
_10const payload = JSON.parse(atob(id_token.split(".")[1]));_10return { name: payload.name, email: payload.email };
🧠 Key Block Highlights
Block Type | Use |
---|---|
Set Variable (isCode) | Build login URL + decode tokens |
Redirect | Send to Google / Open image |
Webhook | Exchange auth code for token |
Condition | Branch logic based on code presence |
Sheets | Save and retrieve user data |
Send Email | Deliver QR as attachment |
✨ Try It Live
Launch QR BoltLogin and test how your last QR is remembered and delivered via email. Then try guest mode — fast, disposable, no memory.
🚀 Why This Matters
QR Bolt is a showcase of what Release0 can do:
- Combine frontend auth
- Call APIs securely
- Build persistent memory using Sheets
- Deliver output via multiple channels
All without backend code. It’s a low-code full-stack experience — and it runs right inside a chat.
Let us know how you’re building smart flows with Release0 + OAuth!