Laravel-PHP Custom user Handling Invalid State Exception

Hey @acooke, that error is to be expected if there is an active session attached to the end-user device when a change is made to the backend session scheme. This is raised by the underlying PHP SDK when a user object is already present in the session, as can be seen here: auth0-PHP/Auth0.php at main · auth0/auth0-PHP · GitHub

Be sure to clear sessions on both the backend and the end-user device and that will be resolved. A session must be getting held onto somewhere on one end or the other of your stack for that error to be thrown. I don’t believe any of those commands actually clear out Laravel’s sessions, you may be able to find some guidance on that here Artisan command for clearing all session data in Laravel - Stack Overflow

As far as using the eloquent driver approach, unfortunately, I’m not sure I can be of much help there; I’ve only worked with the Auth0 recommended route and admittedly I’m not an expert on that side of things

1 Like