Flares Cloud is not currently available to new customers. This documentation is kept for the projects already running on it, and stays accurate for them. What happened.

Flares Developer Docs

Security rules

Who may read and write what, evaluated on every request.

What a rule is

A rule answers one question: may this caller perform this operation on this record? Rules are attached per collection per operation (read, create, update, delete) and are evaluated on every request — console, SDK, curl, realtime subscription alike.

Rules: one row per collection and operation, with its condition.
Rules: one row per collection and operation, with its condition.

The conditions

ConditionAllows when
publicAnyone with a valid project key.
authenticatedThe request carries a valid Flares Auth access token.
ownerThe record's owner field equals the authenticated user's id.
serverThe caller holds a secret key — backends only.
neverNobody. Useful for append-only collections (create allowed, update never).

Identity in rules

When a request carries an Auth access token, the rule sees:

auth.user.id        the Auth user's id (usr_…)
auth.user.email     their email
auth.user.claims    the claims on the token

So sender_id == auth.user.id means "a user may only create messages as themselves" — enforced by Basket, not by your frontend's good manners.

A worked example

messages.read     authenticated
messages.create   owner   (owner field: sender_id)
messages.update   never
messages.delete   server

Signed-in users read the collection and write only their own messages; nothing edits history; only a backend deletes. How tokens reach the rule →

A collection with no rule for an operation refuses that operation. The default is closed — forgetting a rule cannot open your data.