Set up member login
Login proof v3.0. Keep the existing VAPID_PRIVATE_JWK and TEST_ACCESS_KEY values.
1. Create the session database
Cloudflare → Storage & databases → D1 SQL Database → Create database. Name it my-kanzen-auth.
Open that database’s Console. Copy all the SQL from auth-database.sql, paste it into the console and run it once. This creates two empty tables.
2. Connect the database
Workers & Pages → my-kanzen → Settings → Bindings → Add → D1 database. Use variable name AUTH_DB, select my-kanzen-auth, and save. Use the Production environment.
3. Add the login secret
This key protects the stored Wix login tokens. It is separate from your push keys and from Wix’s Client secret.
In the Pages project, go to Settings → Variables and Secrets. Add AUTH_SESSION_KEY, type Secret, for Production. Paste the generated value and save. Keep a private copy; do not send it in chat.
4. Deploy again
Upload the same My_Kanzen_Login_Proof_v3_0.zip again as a Production deployment so the binding and secret take effect.
Return to the login check. Choose Check sign-in, then Sign in with Wix.