Unauthenticated exception, can't login
Hi, I'm using Filament to make an admin panel on a website. With the host plan that chose my client, I don't have any access to a terminal or SSH, so I can only do some (not all) artisan command by code with a route.
The admin panel works perfectly in local and on another host.
To install everything, I just upload all files using FTP (vendor and node_modules included).
I get this error when I want to log in, do you have any clew why I get this exception ? Is there something to install related to user and log in ?
Solution:Jump to solution
Ok, it's working, I have to manually put livewire/livewire.js in the public folder :x
13 Replies
With the host plan that chose my client, I don't have any access to a terminal or SSHYeah, that's not really comfortable with Laravel. You really should avoid Shared Hosting.
I get this error when I want to log in, do you have any clew why I get this exception ? Is there something to install related to user and log in ?Is it really an error? I think
Unauthenticated
should redirect to the login pageYeah, for the host, she is my first client, so I didn't really know what to do about the hosting, but I'll change for the next one.
It might not be an error, but do you know where this can come from ? It returned to the login page but without any error message :/
I don't think it comes from the model, I have the function set correctly
When we do a
php artisan make:filament-user
, does it modify something in the background ? I create the User from a route with User::create()
, do you think it's not a good equivalent ?No nothing in the background. Just a normal user creation. Did this work locally? Can you verify that both conditions are true on production?
I have another host where I have a terminal (with cPanel), and it works, with the same conditions
Sounds like some issue with the session
I delete all the sessions and views cached in storage>framework to try, nothing changed, what can I search for in the session ?
Hey, I'm coming again, I tried another thing :
- Take the local files (where filament login works), upload them on my personal host (o2switch, witch cPanel), and only use
php artisan storage:link
as a command, I upload all the vendor manually to be in the same conditions as the other host.. And surprise, on this host it works ...
- So then, I did the same things on the client host (OVH), and since I don't have a terminal or SSH, I did a symlink('../storage/app/public', '../public/storage');
from a route to create the symlink, and no surprise, it keep not working here, with the same unauthenticated
and redirect back to the login :x
I don't have anymore idea of where to find, if it works on local and other host with the same files, how can this be a code issue ?
PS: I tried to login on the o2switch host without any storage link, and with the symlink approach, and both worked on this hostPublic storage shouldn't be an issue with authentication. Try debugging without Filament first. If you login a user on a test route
Auth::login($user)
and then revisit that route, is that user still logged in? Also check whether your session cookie stays the same. Otherwise that means, your session is regenerated every visitwe had a free cPanel thing for school, it is an absolute pain to get a laravel app up.. It is possible, eventually.. but I would recomend stepping away from shared hosting, not for the next project but for this one.
its not worth the time and effort and its also pretty frustrating usually
Hi, I tried and the auth worked well with the route, here is the code I used In the login, I have my user, if I reload the page, it's still me, in the foo it's me aswell, and if hit the logout, I got the Aucun utilisateur connecté
EDIT: So I tried logging in with the client account with the route, and if I go to the /admin, it works a little bit, I'm in the admin panel, but I got a 500 SERVER ERROR, in the log that says
[2024-01-19 13:21:36] production.ERROR: Livewire page component layout view not found: [components.layouts.app] {"userId":2,"exception":"[object] (Livewire\\Features\\SupportPageComponents\\MissingLayoutException(code: 0): Livewire page component layout view not found: [components.layouts.app] at /home/clairxn/www/vendor/livewire/livewire/src/Features/SupportPageComponents/SupportPageComponents.php:181)
So maybe it's all due to LivewireHmmm, so EDIT N°2, if I comment images line, I don't have any errors
By the way, I'm using https://github.com/spatie/laravel-settings
GitHub
GitHub - spatie/laravel-settings: Store strongly typed application ...
Store strongly typed application settings. Contribute to spatie/laravel-settings development by creating an account on GitHub.
I really thinks it's due to Livewire, here is a screenshots of the working panel
And here with the panel that don't work
Solution
Ok, it's working, I have to manually put livewire/livewire.js in the public folder :x