Skip to main content

User

This node provides access to the current user's data and authentication state.

The User node is the central access point for the logged-in user's profile.

The User node represents the currently authenticated user. It provides outputs for standard fields (Username, Email) and dynamic outputs for any custom fields in your _User collection. It also emits signals when the user logs in or out.

Inputs

Actions

SignalDescription
FetchManually refreshes the user data from the server.

Outputs

General

DataDescription
IdThe unique ID of the current user.
UsernameThe current user's username.
EmailThe current user's email address.
AuthenticatedBoolean. True if a user is currently logged in.

Properties

DataDescription
*Dynamic outputs for custom user fields (e.g., "Avatar", "Role").

Events

SignalDescription
Logged InTriggered when a user successfully logs in.
Logged OutTriggered when the user logs out.
Session LostTriggered if the session expires or is invalidated.
FetchedTriggered when data is refreshed.
ChangedTriggered when any user property changes.

Usage

Showing User Info

  1. Connect Username to a Text node in your header.
  2. Connect Avatar (custom field) to an Image node.

Conditional Logic

  1. Connect Authenticated to an If node.
  2. If True -> Show "Dashboard".
  3. If False -> Show "Login Page".

Detailed Behavior

  • Global State: This node reflects the global authentication state. If you have multiple User nodes, they all update simultaneously.
  • Real-Time: Listens for changes. If the user updates their profile (e.g., via Set User Properties), this node updates immediately.

Troubleshooting

  • No Data: If Authenticated is false, all other data outputs will be undefined.