laravel / sanctum

Laravel Sanctum provides a featherweight authentication system for SPAs and simple APIs.
https://laravel.com/docs/sanctum
MIT License
2.76k stars 296 forks source link

/sanctum/csrf-cookie Should use api instead of web middleware #289

Closed Hill-98 closed 3 years ago

Hill-98 commented 3 years ago

Description:

/sanctum/csrf-cookie Should use api instead of web middleware

The middleware currently used for routing is the web group, but the documentation is to add the EnsureFrontendRequestsAreStateful middleware to the api group. but it won't work unless it is added to the web group or the global middleware.

driesvints commented 3 years ago

The current behavior is the intended one.