0

When i try to login the following error produced:

DecryptException in BaseEncrypter.php line 49: The MAC is invalid. 

I am using xampp with php 7.

The laravel version that i use is 5.2.

*I have change the api key running php artisan key:generate. **I have trying the following commands: php artisan cache:clear composer dump-autoload composer update with no lucky. I have clear the history of the browser.

** Here are the values of some variables:

iv=a69g/gRfyCNWTaKeuZ2Kkw== value=C7DfTHbFWfZq0km633uXMX0ZRd1fuzcFFBgP0vtZj/d4C4Z3btgeFlmU2a1C9TdUlUDof4mnoGhdvEeB/gL1TQ== mac=c0460e4ea3d724631cf4a12b7b19a5e512ecec8f492b4754e183714cc9d0a05c 

Any help would be usefull. Thanks in advance.

1

4 Answers 4

2

I know this is a little late but it might be useful for future me or someone else.

I had an issue where I had to encrypt something in the database, changed the APP_KEY and then tried to decrypt it and this error happened.

Sign up to request clarification or add additional context in comments.

1 Comment

It can also apply when a CSRF token is provided as POST data that does not decrypt correctly based on the current APP_KEY, ie: it's forged
1

It was an error on redis server. Hope that someone will help.

Comments

0

There might be some issue with the .env file as I am having the same problem.

There should be space between APP_KEY and APP_DEBUG

Comments

0

I could find a solution I tried everything including regenerating. However, this worked for me... If you have an existing app_key (in another folder/locally) you may want to restore, you can update it in the .env file manually. Locate the APP_KEY entry in the file and replace the value with the key in your initial .env in your previous project

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.