sveltejs / sapper

The next small thing in web development, powered by Svelte
https://sapper.svelte.dev
MIT License
7k stars 434 forks source link

Add a note about providing a middleware to set a user session #1749

Closed danawoodman closed 3 years ago

danawoodman commented 3 years ago

For a new user it might not be clear that they'll need to provide req.user via a middleware, so I've added a line to make this explicit that they'll need to create some sort of middleware to set the user for the sapper.middleware

Relates to #1437

benmccann commented 3 years ago

Thanks. It might help some, but I'm afraid it also sort of raises the question of how to create userMiddleware. I don't really want to spend much more time on the Sapper docs, so maybe it's better if we just make sure the SvelteKit docs are sufficiently clear on this point

danawoodman commented 3 years ago

Ok, up to you. Now that it is in Beta it makes sense to throw energy at it instead 👍

benmccann commented 3 years ago

Thanks!