mtvbrianking / multi-auth

Laravel Multi-Authentication Package
https://github.com/mtvbrianking/multi-auth-diy
MIT License
179 stars 25 forks source link

login with other column NOT email #25

Closed kmunirawi closed 4 years ago

kmunirawi commented 4 years ago

Hello, awsome multi-auth package for Laravel 6 My question is about login with another column, NOT email such as mobile number or simply: name.

When I override the function username in the guardColtroller, and login with the true data, the submit redirects/reloads to same login page, any if I entered wrong login data, it reloads the login page, with no error message. Any help with this problem, plz?

mtvbrianking commented 4 years ago

@kmunirawi the package supports login with email out of the box.

If you wish to login with another field, you will have to override the default logic. There're many resources regarding this;

Tutorials:

  1. https://medium.com/innohub/laravel-5-6-customizing-default-auth-part-2-login-with-username-or-email-e66a70217178

  2. https://dev.to/pramanadiputra/laravel-how-to-let-user-login-with-email-or-username-j2h

  3. https://codebriefly.com/laravel-authentication-with-username-or-email/

kmunirawi commented 4 years ago

v.good, seems I've forgot to change the needed names in blade. Regards