Docs
Users

Users

How do users relate inside of the system

Users can have memberships to many organizations.

So in the case where you do not have organizations you can simply ignore the membership and organization table.

User Model

  • id: Ids are generated by lucia auth
  • name: The combined name of the user. Names are simply too complex to break up into first name and last name so its easier to start with this.
  • email: Email of the user
  • email_verified: When the email was verified
  • created_at: The UTC time of the user's creation
  • updated_at: The UTC time of the user being updated last
  • role: Role that the user is, this is either CUSTOMER or SUPERADMIN, CUSTOMER is the default role. The SUPERADMIN role is for management of the site.

Notes

We do not need to store the password on the user as lucia handles it.

Authentication

We are using lucia auth and support the following out of the box:

  • Email / Password
  • Google Login

Machine to Machine authentication

Some products I may be building will use machine to machine authentication e.g. if they are an API based product

  • API token system
    • JWT