I've made a new installation of Voyager on XAMPP on Windows following the instructions at https://github.com/the-control-group/voyager
I forgot to install with dummy data so I added an admin user using php artisan voyager:admin me@mydomain.com --create however when I try to login I get the 419 | Page Expired error which I understand is usually an issue with Laravel sessions.
My versions are: Voyager v1.4 | Laravel v7.18 | PHP v7.3.2 | MySql v5.0.12
The following points maybe relevant:
- If I look at the login page source code I don't see any reference to a csrf field.
- Looking in the database the user exists in the user table, and I entered an email_verified_at date directly.
- I notice there's no entry in the user_roles table. I don't know what minimum database entries are required to make it work.
- I've checked that session files are being created in
storage/framework/sessions/ - There's no error log in storage/logs/
- I set 'debug' => env('APP_DEBUG', true), in config/app.php (APP_DEBUG was already set to true in .env) and retried the login but not found any debug log file.
I'm new to Voyager and still learning Laravel. Any ideas please how to make it work please?
UPDATE: After several refreshes of the login page I was able to login, but if I click any menu link it returns me to the login page.
UPDATE2: Re-running the install with dummy data succeeded but it didn't alter the login session issue. However it works perfectly on another device, so it must be some kind of browser session issue particular to the one PC.
Incidentally running the install with dummy data did not add any entries in the user_roles table, but the admin role is assigned when viewed in the users screen (on my other device).