Skip to content
Nuxt · Lesson 08 of 11 · Builds on State: useState, Pinia and cookies

Middleware, sessions and auth

Sign visitors in with a sealed cookie session, check it in every protected API route, redirect pages with route middleware, and avoid the redirect loop and the missing cookie on first load.