I run a laravel App on a aws ec2 instance and use laravel passport to secure my api with Bearer tokens.
After each deployment the passport keys are gone so i added a passport:install command after every deployment.
This forces all users to Relogin.
There musst be a better solution to handle this behavior.
How can i handle a deployment without the passport:install command and without forcing all users to relogin?
A solution or a bester way
You should not need to run
passport:installafter your initial deployment.The Passport keys are installed by default in
storage/oauth-public.keyandstorage/oauth-private.key. You'll need to update your deployment script so that these files are not removed.For a more specific answer, you'll need to add more details about your deployment method.