Nodes/ComfyUI-ZMongo/00 Who Am I
ComfyUI Node

00 Who Am I

Who are we in this database, anyway? — ZMongo 00 Who Am I

By CentralFloridaAttorney·Created 5 months ago·Updated 2 months ago· 1
00 Who Am I
  • session
  • json
  • username
  • db_name
  • success
refresh_token

00 Who Am I is the identity check in ComfyUI-ZMongo's auth suite. Give it a session and it asks the backend "who is this token?" - then hands back your username, your database (db_name), and a success boolean. It's the second node you should reach for after 00 Health when you're setting up a new rig, because it tells you not just that you're connected, but as whom.

Why bother? ZMongo's whole pitch is turning the database into a shared prompt hub and parameter store - synchronize prompts across multiple worker rigs, store generation configs centrally, keep a per-user silo. If you're running several machines against the same hosted backend, "connected but talking to the wrong account" is a real failure mode, and this node is the three-second check for it.

How it works

The node calls session.whoami() and digs the username and silo database name out of the response. The output fields are decoded with a couple of fallbacks (silo_db_name first, then db_name) because the hosted API and the local file store don't label things identically. Against the local file store you'll get back the store's identity rather than a hosted account, which still tells you the session plumbing is coherent.

Like everything in the pack it's AlwaysDirty, so it re-checks on every run instead of caching an old identity.

The inputs and outputs that matter

Only two inputs: session (required, type ZMONGO_API_SESSION) and refresh_token (optional, cache-busting plumbing - ignore it).

The outputs are the interesting part:

  • username - who the session is authenticated as.
  • db_name - which database/silo the session is scoped to. With multiple projects or accounts this is how you confirm you're writing to the right place.
  • json - the full raw response, if you want to eyeball the details.
  • success - boolean, the pass/fail gate.

Install

Same pack install as every other ZMongo node: ComfyUI Manager → search "ComfyUI-ZMongo" → install → restart. Or clone it:

cd ComfyUI/custom_nodes
git clone https://github.com/CentralFloridaAttorney/ComfyUI-ZMongo
cd ComfyUI-ZMongo
pip install -r requirements.txt

You don't need the heavy embedding/OCR dependencies to run this node, but the repo's requirements.txt installs them anyway when you go the full route. For a minimal test of just the session layer, requests plus the clone is enough to get Health and Who Am I answering.

Troubleshooting

  • Empty username / db_name with success: false - the session isn't authenticated. Double-check the API key and base URL on your 00 API Key Session node, or switch to 00 Local File Store Session if you're going local.
  • success: true but empty identity fields - usually means the backend responded OK but the response shape didn't match what the node expected. Grab the json output and read what actually came back; this node is lenient about missing keys, so a silent mismatch is the symptom.
  • Wrong silo - if db_name isn't what you expected, fix the account before you start writing documents. Saves you the fun of hunting for data in the wrong database later.

Wire this node's success into a switch if you want your workflow to hard-stop when the wrong identity connects. Otherwise, treat it as the sanity check it is.

CategoryZMongo/00 Auth

Inputs (2)

NameTypeDefaultDescription
sessionZMONGO_API_SESSION
refresh_tokenoptSTRING

Outputs (4)

NameTypeDescription
jsonSTRING
usernameSTRING
db_nameSTRING
successBOOLEAN