Skip to main content

Basic Username/Password Authentication

The local provider is a standard username/password system. Players will call a register function with the Director Frontend, providing the username and password. The provider will create a unique salt for the user and generate a hash using PBKDF2. Both the salt and the hash are stored in the database. By default, we use the currently recommended number of iterations (210000) for PBKDF2-HMAC-SHA512.

Configuration

VariableDescription
auth.local.account-typeA string enum that can be username (default) or email. Server-side validation is used if email is selected to make sure a valid email is provided.
auth.local.account-verificationA boolean set to false by default; if set to true, the SendGrid integration will be used to send an email for verification. Only works with the email account type.
auth.local.hash.iterationsThe number of iterations to use for the PBKDF2 hashing algorithm; defaults to 210000; only consider decreasing this in development environments for speed.
auth.local.hash.lengthThe length of the hash using the SHA algorithm. Defaults to 512.