apps/docs/content/apis/actions/internal-authentication.mdx
This flow is executed if the user logs in using the login UI hosted by ZITADEL.
The flow is represented by the following Ids in the API: 3
A user has authenticated directly at ZITADEL. ZITADEL validated the users inputs for password, OTP or passkey. Each validation step triggers the action.
The trigger is represented by the following Ids in the API: TRIGGER_TYPE_POST_AUTHENTICATION or 1.
ctx
The first parameter contains the following fields
v1
authMethod string
This is one of "password", "OTP", "U2F" or "passwordless"authError string
This is a verification errors string representation. If the verification succeeds, this is "none"authRequest auth requesthttpRequest http requestapi
The second parameter contains the following fields
metadata
Array of metadata. This function is deprecated, please use api.v1.user.appendMetadatav1
user
appendMetadata(string, Any)
The first parameter represents the key and the second a value which will be storedA user registers directly at ZITADEL. ZITADEL did not create the user yet.
The trigger is represented by the following Ids in the API: TRIGGER_TYPE_PRE_CREATION or 2.
ctx
The first parameter contains the following fields
v1
user humanauthRequest auth requesthttpRequest http requestapi
The second parameter contains the following fields
metadata
Array of metadata. This function is deprecated, please use api.v1.user.appendMetadatasetFirstName(string)
Sets the first namesetLastName(string)
Sets the last namesetNickName(string)
Sets the nicknamesetDisplayName(string)
Sets the display namesetPreferredLanguage(string)
Sets the preferred language, the string has to be a valid language tag as defined in RFC 5646setGender(int)
Sets the gender.
<ul><li>0: unspecified</li><li>1: female</li><li>2: male</li><li>3: diverse</li></ul>
setUsername(string)
Sets the usernamesetEmail(string)
Sets the emailsetEmailVerified(bool)
If true the email set is verified without user interactionsetPhone(string)
Sets the phone numbersetPhoneVerified(bool)
If true the phone number set is verified without user interactionv1
user
appendMetadata(string, Any)
The first parameter represents the key and the second a value which will be storedA user registers directly at ZITADEL. ZITADEL successfully created the user.
The trigger is represented by the following Ids in the API: TRIGGER_TYPE_POST_CREATION or 3.
ctx
The first parameter contains the following fields
v1
getUser() userauthRequest auth requesthttpRequest http requestapi
The second parameter contains the following fields