I appreciate that this may be a stupid question but what is the App Key used for and how should it be used... where and when ?
When I run the command artisan key:generate locally it saves it to the .env file, should I then copy the environment variable to my Forge installation?
I cloned my app in another location, and ran artisan key:generate and got some other app key.
But my passwords, created by Hash::make(), are still working.
I thought that this key is used in Hash::make and that new key will make old passwords unusable.
Am I missing something?
Could some one anwser @Youndivian ?
Should old passwords still be working after I change the app key?
And one more thing. Should I use the same app key on local env as on the serwer?
@akselon@Youndivian Passwords are hashed using bcrypt and do not rely on the app key or anything else so they will work fine (see: \vendor\laravel\framework\src\Illuminate\Hashing\BcryptHasher.php).
As for Forge, log in and navigate to your server and click the icon under Manage. Then choose the tab labeled Environment and click the button labeled Edit Environment. Paste your varables into the overlay and click save. Your changes will be saved as a .env to your project's root. I can't think of any reason to use a different app key, but it is only material to the app that uses it (i.e. prod/dev/etc).