CLI command

skarbiec login identity

Name the account a login signs in as, so one account keeps one authenticator seed for every login of it: a Google account behind three logins needs one enrolment, not three. The account is named by the role its identity plays, never by an item id.

Invocation#

Shell
skarbiec login identity list [<login> | --accounts]
skarbiec login identity set <login> role:<role>
skarbiec login identity unset <login>
skarbiec login identity link --account <address> --role <role> [--yes]

Purpose#

Name the account a login signs in as, so one account keeps one authenticator seed for every login of it: a Google account behind three logins needs one enrolment, not three. The account is named by the role its identity plays, never by an item id.

Required inputs and options#

  • set takes the login and role:<role>, the role the identity plays (an item id is refused). link takes --account, the account's address, and --role, the role the identity plays or will play; without --yes it only shows what it would do. list takes a login, nothing (every login), or --accounts (every account the vault names, with what each lacks). POST /v1/operator/logins/identity/{set,unset,link} and GET /v1/operator/logins/identities take the same fields.

Output and state effects#

  • set writes context.identity on the login and moves the login's working seed and second_factor record onto the identity, journalling login-identity-set; unset removes the name and journals login-identity-unset. link creates identity-<role> tagged stado:role:<role> when the account has none, names it on every live login of the account and moves the one shared seed onto it, journalling login-identity-linked. list --accounts prints each account with its identity, logins, seed state, verification and problems (lacks identity, logins with seeds that differ, logins that name another identity) with the command that fixes each.

Refusals#

  • Every refusal is a declared cause of skarbiec.login-identity under /docs/errors. login-identity-not-login: the item is not a login. login-identity-not-identity: the role is played by another kind. login-identity-role-unheld: no live item plays the role. login-identity-account-unheld: the address names no login. login-identity-account-shared: two identities record the address. login-identity-role-elsewhere: the role is played by another account's identity or another kind. login-identity-seeds-differ: the logins keep different working seeds, so nothing is moved; keep the one the account accepts. login-identity-none-linked: no login of the account is left to link. login-identity-seed-stranded: the identity already keeps another seed.