account

Read-only. Who is signed in to their dasmaffin.com account, if anyone. Signing in is the engine's job — there is a Sign in button on the overlay — and a mod cannot start, end, or inspect a session beyond the two properties here. The access and refresh tokens are not reachable from Lua at all: the sandbox is shared between every mod, so exposing them to one would expose them to all. The table is locked: assigning to it or replacing its metatable raises an error.

It is one account across the whole thing: the same one signs in on the website and here, and a person may have several ways in to it (a password, Steam) that all lead to the same id.
functionaccount.signedIn() → boolean

Whether somebody is signed in right now. Everything else here is nil when this is false. Takes no parameters.

functionaccount.name() → string | nil

Their display name, for showing — e.g. greeting them in a HUD. Not an identity: it is user-chosen, changeable, and not unique. nil when signed out or unset. Takes no parameters.

functionaccount.id() → number | nil

The account id, and the only identity there is — not the email address, since one account can have several logins and the address is merely one of them. Key any per-user state a mod stores on this. nil when signed out. Takes no parameters.

-- remember something per signed-in user
local id = account.id()
if id then data.write("prefs_" .. id .. ".txt", "...") end
One page of the MCCP modding reference. Every section is its own document; search covers all of them.