sign in as user

This block is part of the users group and was last modified in core v13.0.5.

sign in as user v13.0.5

Sign in a regular user account, this only works for accounts with the setting "allow_login_as_user" enabled

In pins 2 + flow
  • flow
    flow
  • User Guid required
    value

    guid of the user that has "allow_login_as_user" enabled and you wish to login for

  • Expire at v10.6.2
    date

    date this session should expire, set as low as possible, shorter sessions are safer

Out pins 5 + flow
  • flow
    flow
  • Success
    condition

    Check if the user successfully signed in! When false, the error pin names the reason.

  • error
    value

    When success is false the error code shows here: USER_IS_NOT_ENABLED_FOR_SIGNIN_AS (target account lacks "allow_login_as_user"), USER_NOT_FOUND, MISSING_USER_GUID or AUTH_SERVICE_NOT_AVAILABLE. Expose or log this pin first when sign-in fails.

  • Auth
    object

    Auth object containing access token and maxAge

  • Accesstoken v12.0.1
    value
  • User
    object

Mints a session token for the account in user_guid WITHOUT any password check (server-side impersonation). It succeeds ONLY when the target account itself carries the setting allow_login_as_user = on; the caller's own privileges are never consulted. That flag is isolation-restricted: the platform refuses to save it together with any other enabled setting except allow_passwordless_login, so admin/root or otherwise privileged accounts can never be signed in as : by design. Blueprints may grant the flag freely only when CREATING the account; enabling it on an existing account requires a caller holding setting_manage_users. On failure success=false, auth/accesstoken/user stay unset (downstream readers get empty defaults), and error names the reason: USER_IS_NOT_ENABLED_FOR_SIGNIN_AS (target lacks the flag : the usual cause), USER_NOT_FOUND, MISSING_USER_GUID, AUTH_SERVICE_NOT_AVAILABLE, or the auth service's own error verbatim. Always read the error pin before debugging a downstream 'no auth' symptom. A target with 2FA gets a token that starts unverified.

login
signin

A typical wiring for sign in as user: a function trigger starts the flow; value feeds the user_guid pin; the flow out pin feeds debug.

Studio canvas example for the sign in as user block: typical wiring for sign in as user.

Used in these guides

These documentation pages use or explain this block:

Version history

Introduced in v13.0.5.

v12.0.1 This block or one of its pins was updated in v12.0.1, click here to see the release notes. v10.6.2 This block or one of its pins was updated in v10.6.2, click here to see the release notes. v10.3.14 This block or one of its pins was updated in v10.3.14, click here to see the release notes.
Back to users Return to the main group to view all sub-groups Back to user management Return to the group to view all blocks within this group