Create a user
A basic user account in Adamite just needs an email and a password.
Once you call the createUser
method, and the user account is created, the user will be automatically signed in to that account.
Storing additional user data
The Adamite authentication system only stores basic information about an account, such as its email address, when it was last logged in, etc. To store additional information about a user, we suggest creating a users
table in the database. To make this process easier, we let you provide a post-registration callback where you can create additional user data in the database.
The user won't be signed in to their new account until the post-registration callback resolves. This allows you to safely assume user data exists in the database once a user is logged in assuming you create that data in the post registration callback.
Prevent automatic login
If you'd like to create an account without automatically logging the user in, you can pass a fourth parameter to the createUser
method to bypass this functionality.
Last updated