Custom Login
Yo,
So I am now trying to implement my custom packages from work, and the first being making use of our User Package which has it's own authentication. How do I update the login process functionality to point to my existing route.
Assuming it's apart of this panel?
I have tried pasting the route inside login() but says it's not defined.
Solution:Jump to solution
This does seem to point to the controller function, so this may actually also cover what I need, until further testing...
9 Replies
And another issue, I have my local User model extending my in house package User Model, and in my local model, I am trying to implement the HasName interface but it's not detecting.
I have included the imports, just no luck. If I manually add HasName in the PackageUser, it detects it as an instanceof HasName, but I dont want to be writing into a vendor package
For context to the message above ^.
The PackageUser extends Authenticatable, but since the function below, also looks for Model. It should work fine?
And I have bound my package model to my project model in my AppServiceProvider.
hey did you find a solution?
You didn’t pass your custom login class to the ->login() method on your panel. I’d start there.
So is that the controller? I did try the model but that didn't work
I did also try calling the route() but it complained that route didn't exist, but it did
I think it needs to be a Livewire component 🤔
Don't suppose you could draft a quick example, (im a visual learner 🤣 )
Of a Livewire component? Default config is
$panel->login(Login::class)
. You can check out that login class for an exampleSolution
This does seem to point to the controller function, so this may actually also cover what I need, until further testing
THis should cover the earlier issue I had of it not detecting the local User thing https://discord.com/channels/883083792112300104/1136587839874814033/1136593537278947329
As if we end up implementing to the user package instead of local project, it shouldn't complain. This was a strange one though