Skip to main content

Project Settings

Every project has a Settings page where you control credentials, team members, authentication behavior, and environment variables for cloud functions. How to get there:
The Settings page has three tabs:

General Tab

API Key

Your project’s API key authenticates every SDK and HTTP request from your app. It must be sent in the X-API-Key header.
  • Click Copy to copy the key to clipboard
  • Click Regenerate to rotate to a new key (the old key stops working immediately)

Allowed Origins (CORS)

Controls which domains are allowed to call your Cocobase API from a browser.
Rules:
  • Add every domain your frontend runs on
  • Include http://localhost:PORT for local development
  • Wildcards (*) are not supported — list each origin explicitly
  • Mobile apps and server-side code don’t need CORS (add them anyway if you see errors)
To add an origin:
  1. Type the full URL (including https://) into the input
  2. Click Add or press Enter
  3. Click Save

Team Tab

Invite other Cocobase users to collaborate on your project. Teammates can access the dashboard, view data, and manage collections — but only the owner can delete the project or regenerate the API key.

Invite a Teammate

  1. Enter the teammate’s Cocobase account email
  2. Click Invite
  3. They appear in the team list immediately — they’ll see the project in their dashboard

Remove a Teammate

Click the trash icon next to their name. They lose access immediately.

Leaving a Project (teammates only)

If you’re a teammate (not the owner), you’ll see a Leave button on the project row in your dashboard:

Configs Tab

The Configs tab has two sections:
  1. Project configuration — built-in settings that control Cocobase behavior
  2. Environment variables — custom key/value pairs for your cloud functions

Project Configuration

These are the built-in config keys. You can set them with the toggles and inputs in the dashboard, or read them from config.get("KEY") inside cloud functions.

Auth

JWT_EXPIRY_MINUTES

How long app-user JWT tokens are valid, in minutes. After this time the user must log in again.

ENABLE_2FA

Enable two-factor authentication for app users. When on, after entering their password correctly, the user receives a one-time code by email and must enter it to complete login. Works alongside OTP_LENGTH. Users can individually opt out of 2FA on their account (if you allow it).

ENABLE_PHONE_LOGIN

Allow app users to authenticate via phone number and a one-time SMS/email code instead of email + password. Requires phone verification setup.

ENABLE_EMAIL_VERIFICATION

Require new users to verify their email address before their account is considered active. On signup, Cocobase sends a verification email. Until verified, the account exists but email_verified is false. Pair with VERIFICATION_URL to point users to your own verification page, or leave it blank to use the Cocobase-hosted one.

OTP_LENGTH

Number of digits in OTP codes sent for 2FA and phone login. Use 4 for shorter codes (friendlier UX), 8 or 10 for higher security.

ALLOWED_SELF_ROLES

Roles that app users can assign to themselves during signup or profile update. If this is not set, users can claim any role. Example — only allow user and seller to be self-assigned:
Roles not in this list (e.g. admin, moderator) can only be assigned server-side via cloud functions or the dashboard.

Email

These settings control the URLs included in system emails (verification, welcome, password reset).

SEND_WELCOME_EMAIL

Send a welcome email to new app users when they register. Disable this if you send your own welcome email via a post_register hook.

FRONTEND_URL

The base URL of your app’s frontend (e.g. https://myapp.com). Used as a fallback when more specific URL configs are not set, and included in email templates as a “go to app” link. Set this first — the other URL configs fall back to it.

VERIFICATION_URL

Base URL for email verification links. When a new user registers with ENABLE_EMAIL_VERIFICATION on, Cocobase sends them a link:
Your page should read the token query param and call the verification endpoint. If not set, falls back to FRONTEND_URL, then to the Cocobase-hosted verification page. Example: https://myapp.com/verify-email

VERIFICATION_SUCCESS_URL

Where to redirect users after they successfully verify their email. If not set, Cocobase shows a default confirmation page. Example: https://myapp.com/welcome

LOGIN_URL

URL of your app’s login page. Included in welcome emails and password-reset emails so users can find their way back. Example: https://myapp.com/login

PASSWORD_RESET_URL

Custom URL for your password-reset page. When a user requests a password reset, Cocobase sends them:
Your page reads the token and calls the reset endpoint. If not set, uses the Cocobase-hosted reset page. Example: https://myapp.com/reset-password

Environment Variables

Store any custom key/value pair here — API keys, feature flags, external service URLs. Access them inside cloud functions with config.get("MY_KEY").
Rules:
  • Keys are auto-uppercased and spaces become _
  • Values are masked by default (click the eye icon to reveal)
  • Keys that match a built-in config name are rejected — use the Config section above for those
  • Changes take effect on the next function execution (no restart needed)
Reading in cloud functions:

Quick Navigation Map