Thanks for the extra info there @acooke! Ah ha, I think I’ve spotted the issue! You seem to be requesting your /login route from 127.0.0.1, but your app is configured to return to localhost after authentication flow. These are different domains, and the cookie wouldn’t be shared between those. I was able to reproduce the invalid state exception when doing things that way, but that is to be expected, as the cookie shouldn’t be shared cross-domain. Try starting your login from localhost instead of 127.0.0.1 and see if it works
Related topics
Topic | Replies | Views | Activity | |
---|---|---|---|---|
Laravel StateException: Invalid state | 0 | 209 | July 9, 2024 | |
Invalid state using PHP SDK in Laravel app with custom user logic | 8 | 1454 | August 15, 2023 | |
Handling Laravel callback() exceptions: "Invalid state" and "Can't initialize a new session while there is one activ..." | 7 | 8606 | November 3, 2021 | |
Auth0 PHP SDK: Invalid state | 8 | 3630 | January 30, 2024 | |
Laravel 5.8 Integration Invalid State on callback | 5 | 3561 | July 30, 2019 |