Unifiedtransform icon indicating copy to clipboard operation
Unifiedtransform copied to clipboard

Login always redirects to 419 Page expired

Open rogermule opened this issue 5 years ago • 13 comments

I have successfully installed the packages and run the migration as well as the seeders. But every time I try to log in, it automatically redirects me to a page that says "419 Page Expired"

Screen Shot 2020-07-27 at 11 00 34 PM Screen Shot 2020-07-27 at 11 00 05 PM

rogermule avatar Jul 27 '20 20:07 rogermule

Does the .env file have correctly placed for localhost?

luisbonejo9807 avatar Jul 27 '20 23:07 luisbonejo9807

Yes. Database migration also successfully run. Screen Shot 2020-07-28 at 9 25 11 AM Screen Shot 2020-07-28 at 9 25 35 AM

rogermule avatar Jul 28 '20 06:07 rogermule

Try this:

  1. Clear Application Cache Run the following command to clear the application cache of the Laravel application. php artisan cache:clear
  2. Clear Route Cache To clear route cache of your Laravel application execute the following command from the shell. php artisan route:clear
  3. Clear Configuration Cache You can use config:clear to clear the config cache of the Laravel application. php artisan config:clear
  4. Clear Compiled Views Cache Also, you may need to clear compiled view files of your Laravel application. To clear compiled view files run the following command from the terminal. php artisan view:clear

luisbonejo9807 avatar Jul 28 '20 23:07 luisbonejo9807

@rogermule in case you are using >PHP7.3, minimum PHP7.3 is required. There are several solutions of this problem in stackoverflow. Find out which one works for you and let us know.

changeweb avatar Jul 29 '20 05:07 changeweb

@luisbonejo9807 I have tried those commands but still not working. @changeweb I'm using PHP 7.2, may be that could be causing the problem. I will try to upgrade to 7.3 and see if it solves the issue.

rogermule avatar Jul 29 '20 07:07 rogermule

Hey have you ever fixed this? I also have this issue

EriksonEnterprises avatar Dec 10 '22 00:12 EriksonEnterprises

Can you paste your env file?

yungifez avatar Dec 10 '22 00:12 yungifez

Can you paste your env file?

I found out it depends on the browser/device...

Computer logs in just fine, but on my phone I get the error

APP_NAME=*removed*
APP_ENV=local
APP_KEY=*removed*
APP_DEBUG=true
APP_URL=*removed*

LOG_CHANNEL=stack
LOG_DEPRECATIONS_CHANNEL=null
LOG_LEVEL=debug

DB_CONNECTION="mysql"
DB_HOST="127.0.0.1"
DB_PORT="3306"
DB_DATABASE=*removed*
DB_USERNAME=*removed*
DB_PASSWORD=*removed*

BROADCAST_DRIVER=log
CACHE_DRIVER=file
FILESYSTEM_DISK=local
QUEUE_CONNECTION=sync
SESSION_DRIVER=file
SESSION_LIFETIME=120

MEMCACHED_HOST=127.0.0.1

REDIS_HOST=127.0.0.1
REDIS_PASSWORD=null
REDIS_PORT=6379

MAIL_MAILER="smtp"
MAIL_HOST="smtp.gmail.com"
MAIL_PORT="465"
MAIL_USERNAME=*removed*
MAIL_PASSWORD=*removed*
MAIL_ENCRYPTION="ssl"
MAIL_FROM_ADDRESS=*removed*
MAIL_FROM_NAME="${APP_NAME}"

AWS_ACCESS_KEY_ID=
AWS_SECRET_ACCESS_KEY=
AWS_DEFAULT_REGION=us-east-1
AWS_BUCKET=
AWS_USE_PATH_STYLE_ENDPOINT=false

PUSHER_APP_ID=
PUSHER_APP_KEY=
PUSHER_APP_SECRET=
PUSHER_HOST=
PUSHER_PORT=443
PUSHER_SCHEME=https
PUSHER_APP_CLUSTER=mt1

VITE_PUSHER_APP_KEY="${PUSHER_APP_KEY}"
VITE_PUSHER_HOST="${PUSHER_HOST}"
VITE_PUSHER_PORT="${PUSHER_PORT}"
VITE_PUSHER_SCHEME="${PUSHER_SCHEME}"
VITE_PUSHER_APP_CLUSTER="${PUSHER_APP_CLUSTER}"

EriksonEnterprises avatar Dec 10 '22 00:12 EriksonEnterprises

Try clearing your phone's cache

All modern browsers support sessions and cookies so it's expected to work on any modern browser at all

yungifez avatar Dec 10 '22 00:12 yungifez

Try clearing your phone's cache

All modern browsers support sessions and cookies so it's expected to work on any modern browser at all

So what was even weirder... I found out it wasn't even logging me in

I cleared the cache and everything, also cleared Laravels... But all the sudden it started working again. So not sure what ultimately fixed it. Maybe the laravel clearing

EriksonEnterprises avatar Dec 10 '22 00:12 EriksonEnterprises

Probably has something to do with invalid session in laravel, all good?

yungifez avatar Dec 10 '22 00:12 yungifez

Probably has something to do with invalid session in laravel, all good?

Who knows... It's working for now. I also forgot to add the meta tag, so added that too - maybe that'll help

Thanks

EriksonEnterprises avatar Dec 10 '22 00:12 EriksonEnterprises

If this is working, please close this issue

yungifez avatar Dec 17 '22 11:12 yungifez