CreateUserRequest class

Constructors

CreateUserRequest.new({String? externalId, String? firstName, String? lastName, List<String> emailAddress = const [], List<String> phoneNumber = const [], List<String> web3Wallet = const [], String? username, String? password, String? passwordDigest, String? passwordHasher, bool? skipPasswordChecks, bool? skipPasswordRequirement, String? totpSecret, List<String> backupCodes = const [], Map<String, Object> publicMetadata = const {}, Map<String, Object> privateMetadata = const {}, Map<String, Object> unsafeMetadata = const {}, bool? deleteSelfEnabled, String? legalAcceptedAt, bool? skipLegalChecks, bool? createOrganizationEnabled, int? createOrganizationsLimit, String? createdAt})
Returns a new CreateUserRequest instance.

Properties

backupCodes List<String>
If Backup Codes are configured on the instance, you can provide them to enable it on the newly created user without the need to reset them. You must provide the backup codes in plain format or the corresponding bcrypt digest.
getter/setter pair
createdAt String?
A custom date/time denoting when the user signed up to the application, specified in RFC3339 format (e.g. 2012-10-20T07:15:20.902Z).
getter/setter pair
createOrganizationEnabled bool?
If enabled, user can create organizations via FAPI.
getter/setter pair
createOrganizationsLimit int?
The maximum number of organizations the user can create. 0 means unlimited.
getter/setter pair
deleteSelfEnabled bool?
If enabled, user can delete themselves via FAPI.
getter/setter pair
emailAddress List<String>
Email addresses to add to the user. Must be unique across your instance. The first email address will be set as the user's primary email address.
getter/setter pair
externalId String?
The ID of the user as used in your external systems or your previous authentication solution. Must be unique across your instance.
getter/setter pair
firstName String?
The first name to assign to the user
getter/setter pair
hashCode int
The hash code for this object.
no setteroverride
lastName String?
The last name to assign to the user
getter/setter pair
legalAcceptedAt String?
A custom timestamp denoting when the user accepted legal requirements, specified in RFC3339 format (e.g. 2012-10-20T07:15:20.902Z).
getter/setter pair
password String?
The plaintext password to give the user. Must be at least 8 characters long, and can not be in any list of hacked passwords.
getter/setter pair
passwordDigest String?
In case you already have the password digests and not the passwords, you can use them for the newly created user via this property. The digests should be generated with one of the supported algorithms. The hashing algorithm can be specified using the password_hasher property.
getter/setter pair
passwordHasher String?
The hashing algorithm that was used to generate the password digest. The algorithms we support at the moment are bcrypt, bcrypt_sha256_django, md5, pbkdf2_sha1, pbkdf2_sha256, pbkdf2_sha256_django, phpass, scrypt_firebase, scrypt_werkzeug, sha256, and the argon2 variants: argon2i and argon2id. Each of the supported hashers expects the incoming digest to be in a particular format. See the Clerk docs for more information.
getter/setter pair
phoneNumber List<String>
Phone numbers to add to the user. Must be unique across your instance. The first phone number will be set as the user's primary phone number.
getter/setter pair
privateMetadata Map<String, Object>
Metadata saved on the user, that is only visible to your Backend API
getter/setter pair
publicMetadata Map<String, Object>
Metadata saved on the user, that is visible to both your Frontend and Backend APIs
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
skipLegalChecks bool?
When set to true all legal checks are skipped. It is not recommended to skip legal checks unless you are migrating a user to Clerk.
getter/setter pair
skipPasswordChecks bool?
When set to true all password checks are skipped. It is recommended to use this method only when migrating plaintext passwords to Clerk. Upon migration the user base should be prompted to pick stronger password.
getter/setter pair
skipPasswordRequirement bool?
When set to true, password is not required anymore when creating the user and can be omitted. This is useful when you are trying to create a user that doesn't have a password, in an instance that is using passwords. Please note that you cannot use this flag if password is the only way for a user to sign into your instance.
getter/setter pair
totpSecret String?
In case TOTP is configured on the instance, you can provide the secret to enable it on the newly created user without the need to reset it. Please note that currently the supported options are: * Period: 30 seconds * Code length: 6 digits * Algorithm: SHA1
getter/setter pair
unsafeMetadata Map<String, Object>
Metadata saved on the user, that can be updated from both the Frontend and Backend APIs. Note: Since this data can be modified from the frontend, it is not guaranteed to be safe.
getter/setter pair
username String?
The username to give to the user. It must be unique across your instance.
getter/setter pair
web3Wallet List<String>
Web3 wallets to add to the user. Must be unique across your instance. The first wallet will be set as the user's primary wallet.
getter/setter pair

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() Map<String, dynamic>
toString() String
A string representation of this object.
override

Operators

operator ==(Object other) bool
The equality operator.
override

Static Methods

fromJson(dynamic value) CreateUserRequest?
Returns a new CreateUserRequest instance and imports its values from value if it's a Map, null otherwise.
listFromJson(dynamic json, {bool growable = false}) List<CreateUserRequest>
mapFromJson(dynamic json) Map<String, CreateUserRequest>
mapListFromJson(dynamic json, {bool growable = false}) Map<String, List<CreateUserRequest>>

Constants

requiredKeys → const Set<String>
The list of required keys that must be present in a JSON.