AccountLogin Cluster

Cluster ID: 0x050E  |  Endpoint: Media endpoint (streaming device, content app on smart TV)

AccountLogin handles content provider account authentication on smart TVs or streaming devices. When a user's phone app is already logged into a video service (e.g., Netflix, YouTube) and wants the corresponding content app on the TV to also gain access to that account, this Cluster handles the authentication. It does not handle playback control (that's MediaPlayback's job), but rather solves the problem of "how does the TV know who you are".

Core Purpose

Think of the content app on a TV as a theater that requires an access card. AccountLogin is the counter that issues temporary access cards. Your phone (Commissioner) takes your ID (account info) to the counter to get a temporary card (Setup PIN), then uses that card to enter (Login). After the movie, you return the temporary card (Logout). The key point is: the temporary card is single-use, and both getting and using the card must be completed within a time limit (Timed Invoke).

Authentication Flow

AccountLogin authentication is a three-step handshake process, driven by the phone app (Commissioner):

  1. Request PIN: The phone app sends GetSetupPIN to the content app on the TV, carrying a temporary account identifier (TempAccountIdentifier). This identifier is generated by the content provider app on the phone, typically a temporary token associated with the user's account
  2. Receive PIN: After validating the temporary identifier, the TV-side content app returns a temporary Setup PIN (max 8 characters). This PIN is single-use, intended for the next login step
  3. Execute Login: The phone app sends the Login command with the temporary identifier and Setup PIN together; after the TV-side verification succeeds, the node gains content access privileges
All Commands Require Timed Invoke

All three AccountLogin commands (GetSetupPIN, Login, Logout) require Timed Invoke. This means each command must first initiate a timed transaction (Timed Request) before sending, and the device only accepts commands within the transaction window. This is a critical security measure to prevent man-in-the-middle replay attacks.

Commands

The AccountLogin Cluster has 3 commands and 1 response. GetSetupPIN has a dedicated response structure GetSetupPINResponse, while Login and Logout return results via a generic Status. Click a command ID in the table below to jump to its detailed description.

ID Name Direction Description
0x00 GetSetupPIN Client → Server Request temporary Setup PIN
0x01 GetSetupPINResponse Server → Client Return temporary Setup PIN
0x02 Login Client → Server Log in with temporary identifier + PIN
0x03 Logout Client → Server Log out of current account

GetSetupPIN — Request Setup PIN (0x00)

Sent by the phone app (Client) to the content app on the TV (Server), requesting a temporary Setup PIN. Upon receiving the request, the content app queries user account information based on TempAccountIdentifier, and if valid, generates and returns a temporary PIN.

ParameterTypeDescription
TempAccountIdentifier string Temporary account identifier generated by the content provider app on the phone. Max length 100 characters. Format defined by the content provider, typically a temporary token associated with the user account
What is TempAccountIdentifier

This field is NOT the user's username or password. It is a temporary token generated by the phone app while the user is logged in, used to let the TV-side content app identify "which authenticated user this request comes from". The specific format and generation method are defined by the content provider (e.g., Netflix, Disney+).

GetSetupPINResponse — Return Setup PIN (0x01)

The TV-side content app's response to GetSetupPIN. If the temporary account identifier is valid, returns a temporary PIN usable for Login.

FieldTypeDescription
SetupPIN string Temporary Setup PIN, max length 8 characters. Used for the subsequent Login command. The PIN is temporary, and the content app can determine its own validity period
PIN is Temporary

The SetupPIN should be single-use or short-lived. The content app should not return a fixed, unchanging PIN, as this risks replay attacks. It is recommended to invalidate the PIN immediately after a successful Login, or set a short expiration time (e.g., 2 minutes).

Login — Log In (0x02)

Completes login using the previously obtained temporary account identifier and Setup PIN. After successful login, the requesting node gains access to the content app and can browse and play the user's subscribed content.

ParameterTypeDescription
TempAccountIdentifier string Same temporary account identifier as used in GetSetupPIN
SetupPIN string Temporary PIN returned by GetSetupPINResponse
Node node-id (optional) Specifies the node ID to authorize. If omitted, authorizes the node sending this command. Used when the phone requests login on behalf of another device
Common Causes of Login Failure
  • PIN expired — too long between GetSetupPIN and Login, PIN has expired
  • PIN mismatch — TempAccountIdentifier does not correspond to the SetupPIN
  • Timed Invoke not used — command was not sent via a timed transaction, device rejects directly
  • Account identifier invalid — TempAccountIdentifier has expired or does not exist on the content provider side

Logout — Log Out (0x03)

Revokes access privileges previously obtained through Login. After logout, the corresponding node can no longer access the content app's user content.

ParameterTypeDescription
Node node-id (optional) Specifies the node ID to log out. If omitted, logs out the node sending this command
Usage Scenarios

Called when the user signs out of the content provider account on the phone, switches accounts, or manually manages device access. Can also be triggered by automation rules — for example, automatically logging out the TV's content app when the phone leaves the home network.

Attributes

The AccountLogin Cluster has no application-level custom attributes. It only contains global attributes required by the Matter specification (Global Attributes), which describe the Cluster's meta-information.

ID Name Type Description
0xFFF8 GeneratedCommandList list<command-id> List of response commands the Server can generate. Typically [0x01] (GetSetupPINResponse)
0xFFF9 AcceptedCommandList list<command-id> List of commands the Server can accept. Typically [0x00, 0x02, 0x03] (GetSetupPIN / Login / Logout)
0xFFFA EventList Removed in newer versions list<event-id> In older versions, listed the event IDs this cluster supports. Newer Matter versions removed EventList from the global attributes, so devices no longer report it
0xFFFB AttributeList list<attrib-id> List of attribute IDs in this Cluster
0xFFFC FeatureMap map32 No optional features currently, value is 0
0xFFFD ClusterRevision uint16 Cluster specification revision
Why No Application Attributes

AccountLogin is a purely command-driven Cluster. Its core functionality (authentication) is completed through command interactions, with no need for persistent state stored in attributes. Login status is managed by the content app itself, not exposed via Cluster attributes. This contrasts with "stateful" Clusters like AdministratorCommissioning.

Security Mechanisms

AccountLogin involves user account authentication, with higher security requirements than ordinary control Clusters. The Matter specification imposes the following constraints:

Timed Invoke

All three commands must be sent using Timed Invoke. How Timed Invoke works:

  1. Client first sends a TimedRequest, declaring the timeout for the subsequent command
  2. Server replies with acknowledgment and starts the timer
  3. Client sends the actual command (e.g., Login) within the timeout window
  4. After the timeout window closes, Server no longer accepts the command

The core purpose of this mechanism is to prevent replay attacks: even if an attacker intercepts the complete Login command packet, it cannot be resent after the timeout window closes.

Temporary PIN Mechanism

Setup PIN is the second line of defense in the authentication flow:

  • PIN is dynamically generated by the TV-side content app, not a fixed password
  • PIN is bound to a specific TempAccountIdentifier and cannot be used across accounts
  • PIN should have a validity period (spec recommends as short as possible); even knowing the PIN, login fails after expiration
  • PIN should be invalidated immediately after use to prevent reuse

Access Privilege Requirements

AccountLogin commands require Administer level access privilege. This means only nodes with administrator privileges in the device ACL can invoke these commands; normal Operate level privileges are insufficient.

Example Data

Cluster Attribute Read

Read all attributes of the AccountLogin Cluster (global attributes only):

{
  // --- Global Attributes ---
  "0xFFF8": [0, 1],            // GeneratedCommandList = [GetSetupPINResponse]
  "0xFFF9": [0, 2, 3],         // AcceptedCommandList = [GetSetupPIN, Login, Logout]
  "0xFFFB": [                   // AttributeList
    0xFFF8, 0xFFF9,
    0xFFFB, 0xFFFC, 0xFFFD
  ],
  "0xFFFC": 0,                  // FeatureMap = 0 (no optional features)
  "0xFFFD": 2                   // ClusterRevision = 2
}

GetSetupPIN Interaction Example

Phone app requests Setup PIN from the TV content app:

// Phone App → TV Content App: Request Setup PIN
{
  "invokeRequests": [{
    "commandPath": {
      "endpointId": 3,
      "clusterId": "0x050E",
      "commandId": "0x00"              // GetSetupPIN
    },
    "commandFields": {
      "TempAccountIdentifier": "user_abc_token_20260901"
                                       // Temporary account identifier generated by the phone
    },
    "timedRequest": true,              // Must use Timed Invoke
    "interactionTimeoutMs": 10000
  }]
}

// TV Content App → Phone App: Return Setup PIN
{
  "invokeResponseMessage": [{
    "commandPath": {
      "endpointId": 3,
      "clusterId": "0x050E",
      "commandId": "0x01"              // GetSetupPINResponse
    },
    "commandFields": {
      "SetupPIN": "34567890"           // Temporary PIN for subsequent Login
    }
  }]
}

Login Interaction Example

Complete login using the obtained PIN:

// Phone App → TV Content App: Login with PIN
{
  "invokeRequests": [{
    "commandPath": {
      "endpointId": 3,
      "clusterId": "0x050E",
      "commandId": "0x02"              // Login
    },
    "commandFields": {
      "TempAccountIdentifier": "user_abc_token_20260901",
      "SetupPIN": "34567890",          // PIN returned by GetSetupPINResponse
      "Node": "0x0000000012345678"     // Optional: specify the node ID to authorize
    },
    "timedRequest": true,
    "interactionTimeoutMs": 10000
  }]
}

// TV Content App → Phone App: Status = SUCCESS

Logout Interaction Example

Log out of the current account:

// Phone App → TV Content App: Logout
{
  "invokeRequests": [{
    "commandPath": {
      "endpointId": 3,
      "clusterId": "0x050E",
      "commandId": "0x03"              // Logout
    },
    "commandFields": {
      "Node": "0x0000000012345678"     // Optional: specify the node ID to log out
    },
    "timedRequest": true,
    "interactionTimeoutMs": 10000
  }]
}

// TV Content App → Phone App: Status = SUCCESS
Developer Tip

The timedRequest: true and interactionTimeoutMs in all command examples are NOT optional. If the SDK does not automatically handle Timed Invoke, the timed transaction must be constructed manually. Most Matter SDKs (such as CHIP Tool, connectedhomeip) handle this automatically when invoking commands marked as Timed Invoke, but custom implementations need to be aware of this.

Common Scenarios

Scenario 1: Auto-login to TV content app when casting from phone

Background: The user has Netflix open and logged in on the phone, and now wants to watch on the TV. The TV already has the Netflix content app installed.

  1. The user selects "Cast to TV" in the phone's Netflix app
  2. The phone discovers the Endpoint of Netflix's content app on the TV (e.g., Endpoint 3)
  3. The phone's Netflix app generates a temporary account identifier (linked to the user's Netflix account)
  4. The phone sends GetSetupPIN (0x00) to the TV's Endpoint 3, carrying the temporary account identifier
  5. The TV-side Netflix app validates the identifier, generates a temporary PIN, and returns it
  6. The phone automatically sends Login (0x02) with the identifier and PIN
  7. Login successful — Netflix on the TV can now access the user's watch history, favorites, and subscribed content
  8. The user selects content on the TV for playback, controlled via MediaPlayback

The entire process is seamless for the user: after tapping "Cast", the TV automatically switches to a logged-in state. PIN exchange happens in the background, and the user does not need to manually enter any information on the TV.

Scenario 2: Multi-user switching and logout management

Background: Multiple people in a household share one TV, each with their own content subscription account.

  1. User A's phone has logged the TV into A's account via Login
  2. User B wants to switch to their own account:
    • B's phone first sends Logout (0x03) to log out A's session (if B's node has permission), or A sends Logout from their own phone
    • B's phone then executes the full GetSetupPIN → Login flow to log in B's account
  3. Recommended logout timing:
    • When the user actively switches accounts
    • When the phone app signs out, simultaneously log out all authorized TVs
    • Provide a "Sign out of all devices" option in the device management page

Note the Node parameter: The Node parameter in Login and Logout allows one node to operate on behalf of another. For example, a family administrator can log out other family members' sessions on the TV from their own phone.