How to prevent existing tokens from being revoked when updating Laravel 5 to 7?

48 views Asked by At

I was using Laravel 5.8, which included many unnecessary libraries. Therefore, I decided to create a new project using Laravel 7.30.6 and copied all the necessary files.

Everything seems to work properly except that the upgrade process revokes existing tokens. This is problematic as it affects end users.

I even tried using the same APP_KEY in the current Laravel 7.30.6 setup, but it still revokes the previous tokens. Is there a way to update without having the existing tokens revoked?

1

There are 1 answers

0
rannmann On

It's generally advisable to upgrade one version at a time. There are a lot of resources to help with each upgrade, but only if you do them in sequence. Doing a fresh install is likely to introduce a whole host of problems.

Note that neither of these say anything about token or encryption changes, so if that's your issue it's probably less to do with the laravel upgrade and more to do with copying an existing project.