I've setup Laravel to use a custom 'SESSION_DOMAIN' and 'SANCTUM_STATEFUL_DOMAINS'. However I can't use Postman to login. What I did:
- make GET request to '/sanctum/csrf-cookie'- save XSRF cookie value in an environment variable: xsrfToken
- added header X-XSRF-TOKEN with the value being {{xsrfToken}}
Every time I make the post request I get:"Illuminate\Contracts\Encryption\DecryptException: The payload is invalid. in file ~/vendor/laravel/framework/src/Illuminate/Encryption/Encrypter.php on line 195" And if I try it without the X-XSRF-TOKEN header I get a 419 Page Expired error. Anyone came across this problem? There seems to be no answer to my question yet when google searching.
Sanctum uses Laravel's built-in cookie based session authentication services
– TEFO