-
Notifications
You must be signed in to change notification settings - Fork 283
Auth\Login: allow username customization #246
Conversation
|
BOOM! Your first PR with us, thank you so much! Someone will take a look at it shortly. Please keep in mind that:
Thank you! -- |
|
Thanks for the PR. Seems like a good improvement to me. But wouldn't this also need some changes in the blade files and maybe validation? If the developer only changes the config option, will it work? Thanks again! |
|
yes @tabacitu he mentioned that |
|
In my case, I only edit I intentionally didn't update the blades files in the PR. If you change the way to connect with different username, you need to know how to change register / password reset methods or disable it (as I do; registered user in AD server without option to edit password in web app). If you want to allow dev to only change This comment gave me the idea to put |
|
Hmm... I don't know... I think we should either (A) include a complete solution (change or (B) provide no help for this at all While a part-solution might help some users, I don't think it's a good choice in the long run, since it would certainly annoy others that don't understand what they need to do. It would bring a lot of questions and support requests. Again - I really appreciate the PR, thank you for it, I just want to see what's the best way we can go further. Before we do, let's ask some more people what they think. Thank you! |
|
@Laravel-Backpack/veterans do you think Backpack/Base should come with the ability to change the login from |
|
Honestly I've found that I end up changing/reimplementing or meddling with Laravel's default authentication as either the first or second step in any project. |
|
This could be a game changer. Being able to pick and change what you use as username could improve the adoption rate (which is really high, I know); A good idea would be to actually provide the user with a multitude of options (ie: phone number, one time code and so on) would be a really great addition. However, I'm not sure if this should be in backpack and not Laravel's auth.. |
|
Let's see if we can make this thing happen! :-) I merged this PR into #257 and expanded it. Let's move the conversation there please. Warning: I'm not 100% sure this is a feature we want/need yet. Not if we can't provide a reasonable solution. And there are a few problems I expect we'll encounter, but I do think it's worth a shot. That's why I merged it into that other PR and worked on it. @lloy0076 what did you end up changing in the authentication, every time? I'm curious - might be a pain point the Backpack can solve? @niladam I can't say I agree that this feature would increase adoption :-) Backpack has been around for ~2 years and this is the first time I hear about people wanting to change I think other fields (phone number, one-time-code etc) are definitely beyond the scope of Backpack. They can be so varied, that we have no way of helping the developer there. We can only make it easy for him to change the code. And I think that's where Backpack shines - it's dead-simple to change stuff. |
If you change your User model to use another field that email to authenticate, you can't use BackPack.
(In my case, I use Adldap2 to login with AD username)
You need to update
login.blade.phpto allowusernameinstead ofemailfield.