Files
evidencija-rezija/README.md
2023-12-27 15:45:49 +01:00

21 lines
1.0 KiB
Markdown

## Next.js App Router Course - Starter
This is the starter template for the Next.js App Router Course. It contains the starting code for the dashboard application.
For more information, see the [course curriculum](https://nextjs.org/learn) on the Next.js Website.
## ToDo
Zadnje sam stao na koraku 12 (nisam ga dovršio): https://nextjs.org/learn/dashboard-app/mutating-data
# Authentication
Authentication consists of the following parts:
* `next-auth` boilerplate
* `middleware.ts` = hooks-up `next-auth` into the page processing pipeline
* `auth.config.ts` = defines how user session is to be checked and redirects anonymous user to login page
* `auth.ts` = verifies user credentials during the log-in action (i.e. against a database)
* exports `auth`, `signIn`, `signOut` actions
* UI boilerplate
* `sidenav.tsx` = implements logout action - calls `signOut` from `auth.ts`
* `login-form.tsx` = implements login form
* `actions.ts` = handles login-form validation and submition - calls `signIn` from `auth.ts`