PassiveDrip moves from Games to an Earn-tab card (it is an earning site); members see it when site config passivedripLive=on, admin preview until then
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -1255,8 +1255,6 @@ function GAMES() {
|
||||
art: DR_URL() + '/badges/ch5.jpg', play: '/api/my/driprunner', pays: 'POL to your wallet at 0.25', progress: drProgress },
|
||||
{ slug: 'polhunter', name: 'PolHunter', tag: 'Scavenger hunt', blurb: 'Hunt hidden codes on sites across the network. Every find drips POL straight to your wallet.',
|
||||
art: 'https://polhunter.com/img/hero-800.webp', play: '/api/my/polhunter', pays: 'POL per find' },
|
||||
{ slug: 'passivedrip', name: 'PassiveDrip', tag: 'Faucet + games', blurb: 'Claim the faucet, view paid-to-click ads, roll the bonus and play the mini games for coins. One tap signs you in with this account, no new password.',
|
||||
art: '/assets/passivedrip-card.svg', play: '/api/my/passivedrip', cta: 'Open', pays: 'POL to your wallet at 2,000 coins ($1)', progress: pdProgress },
|
||||
];
|
||||
}
|
||||
// -- PassiveDrip hand-off (2026-10-01): same token shape as Drip Runner, its own secret (PD_SSO_SECRET, also stored in
|
||||
@@ -2469,6 +2467,18 @@ const server = http.createServer(async (req, res) => {
|
||||
sponsorRef: (acct && acct.sponsorRef) || null, joinedRef: (acct && acct.joinedRef) || null, joinedAt: (acct && acct.created) || null }); // the game credits referrals to the IAP sponsor
|
||||
res.writeHead(302, { Location: DR_URL() + '/auth?t=' + tok, 'Cache-Control': 'no-store', 'Set-Cookie': 'iap.return=; Path=/; SameSite=Lax; Max-Age=0' + (IS_PROD ? '; Secure' : '') }); return res.end();
|
||||
}
|
||||
// -- PassiveDrip card on the Earn tab (Marty, 2026-10-01: "It's an earning site", not a game). Members see it when
|
||||
// site config passivedripLive is 'on'; until then only the admin sees it, marked preview.
|
||||
if (p === '/api/my/passivedrip/card' && req.method === 'GET') {
|
||||
const s = await auth.fromRequest(req);
|
||||
if (!s || !s.email) return json(res, 401, { error: 'Sign in first.' });
|
||||
const live = String(siteConfig().passivedripLive || 'off') === 'on';
|
||||
const admin = !!(ADMIN_EMAIL && String(s.email).toLowerCase() === ADMIN_EMAIL);
|
||||
if ((!live && !admin) || PD_SECRET().length < 32) return json(res, 200, { show: false });
|
||||
const acct = await accounts.byEmail(s.email); const memberId = (acct && acct.memberId) || s.memberId || 0;
|
||||
let progress = null; try { progress = await pdProgress(memberId, s.email); } catch (e) {}
|
||||
return json(res, 200, { show: true, preview: !live, line: progress && progress.line || null });
|
||||
}
|
||||
// -- PassiveDrip hand-off (2026-10-01): sign the member across; PassiveDrip verifies with the shared secret.
|
||||
// wallet = the signature-verified main wallet (accounts.linkWallet runs only after /api/auth/verify), offered there, never imposed.
|
||||
if (p === '/api/my/passivedrip' && req.method === 'GET') {
|
||||
|
||||
Reference in New Issue
Block a user