marvinjudehk's avatar

No application encryption key has been specified. (Lumen)

i am trying to use lumen-passport( https://packagist.org/packages/dusterio/lumen-passport) in my lumen API project. after following all the procedure in the docs, i get this error : (1/1) RuntimeException No application encryption key has been specified.

I created a config/auth.php file in the root directory. is this the correct location?? i suspect that i must have placed it wrongly.

0 likes
6 replies
lostdreamer_nl's avatar

The auth config is ok, but you'll need to specify a random key that is used during encryption.

You can generate one by using this artisan command from within your project folder:

 php artisan key:generate
marvinjudehk's avatar

That artisan command isn't available when using lumen.

lostdreamer_nl's avatar

Aah, havent played with Lumen in some time now.

You can just manually add a key (32 random characters) in the .env file for the APP_KEY.

execom99's avatar

@SMALLY - thank you, got it, overlooked empty one and created new one ... it did not work :)

Please or to participate in this conversation.