Files
evidencija-rezija/README.md
2024-01-09 10:52:13 +01:00

1007 B

ToDo

Authentication

Authentication consists of the following parts:

  • next-auth boilerplate
    • middleware.ts = hooks-up next-auth into the page processing pipeline - user session is checked before any page is rendered
    • auth.ts = defines how the authentication is done, and how session is checked (used by middleware)
    • /app/api/[...nextauth]/route.ts = defines route which shows an authentication form

Source:

Multi-User Support

Each location record is marked with a user ID.

All the actions user withUser to fetch user ID, which is then used in all the DB operations.