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
CUSTOMERorSUPERADMIN,CUSTOMERis the default role. TheSUPERADMINrole is for management of the site.
Manual action required!
If you add attributes to your user model you will need to add them to
app.d.ts as well so that Lucia Auth knows about them.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
Work in progress!
This is not thought through and should be ignored for the time being
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
On This Page