🔐
w3auth
  • Welcome!
  • Installing
  • CORS
  • Authentication Flow
  • Integration Example
  • KYC
  • External Backend
  • API Reference
    • Active Chains
    • Nonce
    • Verify nonce
    • Link Wallet
    • Unlink Wallet
    • Profile & Custom fields
    • Logout
  • Package
    • React JS
  • Connect API
    • Enable API
    • User details
    • Allowlist Address
    • Blocklist Address
    • Get Settings
    • NFT Gating
    • Token Gating
Powered by GitBook
On this page
  • Database
  • Admin Account
  • Cron Jobs

Installing

PreviousWelcome!NextCORS

Last updated 2 years ago

The following details are required on the env file.

DATABASE_URL=
JWT_SECRET=
ADMIN_JWT_SECRET=
ALCHEMY_API=
CRON_PASSWORD=

Postgres database url can be entered in the environment. You can get one from or

is used for NFT Gating and Token Gating features.

For admins and users, you must use separate JWT Secrets.

Generate JWT SHA 256 Secret from:

You must enable Cloudflare and Cloudflare IP geolocation in order to use the country blocklist and log user login information.

Database

You can import the db/db.sql to your database or run the following prisma migration command.

npx prisma migrate

Admin Account

Replace 0x00000000000000000000000000000000dEaD with your wallet address in the db/seed.ts file. Or you can create and record at the admins table on postgres with your wallet address

Cron Jobs

15 min cron jobs for nonce clear.

*/15 * * * * /api/console/cron/clear_nonce?password=[CRON_PASSWORD]

4hr cron jobs for tokens clear.

* */4 * * * /api/console/cron/clear_tokens?password=[CRON_PASSWORD]

To clear refresh tokens and nonces, cron jobs are used. You can use to manage cron.

supabase
planetscaledb
Alchemy API
https://cloud.google.com/network-connectivity/docs/vpn/how-to/generating-pre-shared-key
https://cron-job.org/en/