25.06.2018 Views

Full-Stack Vue.js 2 and Laravel 5

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Passport keys<br />

In Chapter 9, Adding a User Login <strong>and</strong> API Authentication with Passport, we<br />

created encryption keys for Passport with the php artisan passport:install<br />

comm<strong>and</strong>. These keys are stored in text files that can be found in the storage<br />

directory.<br />

Encryption keys should not be under version control, as this would make them<br />

insecure. Instead, we need to regenerate these keys on each deploy. We can do<br />

this by adding a post-install script to our composer file.<br />

composer.<strong>js</strong>on: "scripts": {<br />

...<br />

"post-install-cmd": [ "Illuminate\\Foundation\\ComposerScripts::postInstall",<br />

"php artisan optimize",<br />

"php artisan passport:install"<br />

],<br />

}

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!