diff --git a/lib/sso.js b/lib/sso.js index d65106c..e130e80 100644 --- a/lib/sso.js +++ b/lib/sso.js @@ -37,7 +37,9 @@ function open(token) { function verify(token) { const r = open(token); if (r.error) return r; const c = r.claims; - if (!c.memberId || !c.email) return { error: 'That sign-in link is missing your account.' }; + if (!c.email) return { error: 'That sign-in link is missing your account.' }; + // a free member with no wallet has no on-chain id yet: key them on their email until they link one + if (!(Number(c.memberId) > 0)) c.memberId = -parseInt(crypto.createHash('sha256').update(String(c.email).toLowerCase()).digest('hex').slice(0, 11), 16); for (const [n, exp] of used) if (exp < Date.now()) used.delete(n); if (used.has(c.nonce)) return { error: 'That sign-in link was already used.' }; used.set(c.nonce, c.exp); diff --git a/public/index.html b/public/index.html index 0466bd1..65ce69b 100644 --- a/public/index.html +++ b/public/index.html @@ -19,7 +19,7 @@
  1. Sign in to InstantAdPay firstOpen instantadpay.com/my in this same browser and sign in the usual way (email code).
  2. Then tap this buttonInstantAdPay signs you across. No new account, no new password.
    Open Drip Runner
  3. -
  4. Have a wallet on your IAP accountYou can play without one, but POL payouts go to the wallet on file at InstantAdPay. Link it under Wallet on your IAP dashboard.
  5. +
  6. Have a wallet on your IAP accountYou can play without one, but POL payouts go to the wallet on file at InstantAdPay, and your game progress follows your member id once a wallet is linked. Link it under Wallet on your IAP dashboard before you play.

If you see "not on the tester list", your IAP account has not been added yet. Tell Marty which username you use.