Disable login
Hi
I'm buildinf a Laravel + Jetstream + Filament APP
How can I disable Filament Login? and only use Jetstream login / register.
38 Replies
Remove ->login() from the panel.?
Yes!
Hmmm, for some reason I get ths error

I just want to be able to access the site, but without login
@PabloZagni Did you have the same issue, or did it work immediately? Did you do anything else?
I tried using ->login(null) but that didnt work
That’s odd since Jetstream defines a login named route. Maybe a route cache issue.
I dont think so. Its from a fresh project
Even when clearing the cache

So actually just redirect login to login
So:
Route::redirect('/manage/login', '/login');
It's how I handle it in my jetstream app
OK, this might sound a bit dumb, but isnt jetstream already with livewire/filament?
I didnt find anything about jetstream in the filament docs
You wouldn't
No it isn't
jetstream has nothing to do with filament, but I use jetstream on a project and use the above redirect to resolve the forcing of login pages
Oh, hmm. Then by removing the login(), why do you need jetsream to access without login()
Im not sure if im understanding this right
The above doesn't disable it, it just redirects it. So you have your route that always works, so we redirect it tto that root. /manage/login is my panel login page
Also if you are disabling the login, shouldnt it be
Route::redirect('/manage/login', '/manage');?
Why redirect to login?
What I want is to be able to access the website without having to login. Is that possible? No login panel whatsoever, just directly to the site
Because I don't think you can remove login because the application if you define login will look to login you to the panel, not to the primary route for access. But I haven't played so much with V3, and that's how dan recommended we handled it in V2.
Should I maybe make a new thread and tag Dan?
He surely knows more
No, don't create threads tag please. It's against our #✅┊rules
Give me a second to review
OK no, I meant it as a new help thread
Arent these called threads? xd

Yeah tagging full stop unless they know about it is against our rules.
Ah okk
let me try with my v3 jetstream app one minute
ok Dennis is right, remove ->login() completely.
run:
php artisan cache:clear
then access your standard jetstream login page.
It still asks me to to log in

What exactly are you trying to do? By default access to filament panels requires a logged in user.
Hmm, well that complicates things. I want a panel that users can access without logging in with an account
Check the PRs on GitHub. There was a recent one that allows to bypass it. Not sure how it’s implemented though. I will say to be very careful with it though. 🙂
Oke! Is it also possible to make a guest user, and the panel just automatically logs in the (guest) user
Yes.
How would the autologin work though?
You over ride the login class and just use laravel’s convention to log them in.
So in that case you would need the ->login()
Personally I’ve never understood how an auto login guest works. Seems to me that could create issues with the same user logged in on 100s or more different machine. I’m probably wrong though.
ok screw it, I could just make a laravel/livewire page
I dont want users to CRUD any data
Actually
Just read
NOthing else
Thank you for the help!
That’s what I would have done to start with. 🙂
Righttttt so that's what you were doing wrong hehe. You can actually also create a guest user and enable the login page again but auto-login as guest removing the need for login 😉
This is what I did:
Stupid question: even though im technically not authentucated, users cannot perform sql injections, right? Thats purely laravel protection?
I want to have a table that users can just read
As long as I dont add a form or actions that perform queries, its safe, right?
As long as you have policies in place for your models you should be fine.
@Matthew Give mysql user to only read privilege, or in your db just do this;
ALTER DATABASE database_name READ ONLY = 1;
by this way and with awcodes way, no one can not write any new row on your db
Thank youu!