🎁 Admin Panel - Token Management

Logged in as: admin | Back to Site

Give Tokens to User

Database Connection Test

Use this to diagnose database connection issues. Click the button below to test your Supabase connection.

🔧 Common Database Issues & Fixes

1. Table "users" does not exist

Fix: Go to Supabase Dashboard → Table Editor → Create new table "users" with columns:

  • id - uuid, primary key, default: uuid_generate_v4()
  • user_identifier - text, unique
  • tokens - integer, default: 0
  • created_at - timestamp, default: now()
  • updated_at - timestamp, default: now()

2. Permission denied / RLS error

Fix: Go to Supabase Dashboard → Authentication → Policies → Create policy for "users" table:

  • Policy name: "Allow all operations"
  • Allowed operation: ALL (or SELECT, INSERT, UPDATE separately)
  • Target roles: anon, authenticated
  • USING expression: true (allows all rows)
  • WITH CHECK expression: true (allows all operations)

Or disable RLS: Table Editor → users table → Settings → Disable Row Level Security

3. ERR_NAME_NOT_RESOLVED / Failed to fetch

This usually means your Supabase project is paused or the URL is wrong.

  1. Check if project is paused:
    • Go to Supabase Dashboard
    • Find your project (ref: nhrovnzpozyyirvgdock)
    • If it shows "Paused", click "Restore project"
    • Wait a few minutes for it to restart
  2. Verify the URL is correct:
    • Go to Supabase Dashboard → Your Project → Settings → API
    • Copy the "Project URL" (should be: https://[ref].supabase.co)
    • Update config.js with the correct URL
  3. Check project status:
    • Free tier projects pause after 1 week of inactivity
    • You need to manually restore them
    • Or upgrade to Pro to avoid auto-pause

4. Invalid credentials

  • Verify SUPABASE_URL in config.js matches your project URL
  • Verify SUPABASE_ANON_KEY in config.js matches your project's anon/public key
  • Get keys from: Supabase Dashboard → Settings → API

All Users