Skip to main content
On a server you can keep secrets, so you have two options: Prefer acting as the user when the request comes from a signed-in user. It keeps row-level security in force. Use a platform key for admin work, jobs, and integrations.

Next.js

Forward the user’s token

If your server receives the user’s access token (for example from an httpOnly cookie), forward it with an end_users key:

Node.js script

sync.mjs

Python

sync.py
Keep platform keys out of anything shipped to browsers, including Next.js variables prefixed with NEXT_PUBLIC_.