Shield: validFields includes username but does not pass validation |
Hi all,
currently I am migrating from Myth\Auth to Shield and have issues to allow username additional to mail as login credential. Auth.php: PHP Code: public array $validFields = [ I reworked the login view so that it acts like Myth\Auth and the browsers allows to post plain usernames instead mail addresses. login.php: PHP Code: <?php if (config('Auth')->validFields === ['email']): ?> When submitting form, I get mail field is not valid mail address. Any hints how to get both (email or username) working? When I rename the input to 'name=username', I get that email is required. Where did I miss to activate passing verification for additional username? Is Shield ready for production or still beta? Thanks for your help. Kimotu
Hi,
Login username see: https://github.com/codeigniter4/shield/discussions/323 Is Shield ready for production or still beta? https://forum.codeigniter.com/showthread...#pid401007 (11-03-2022, 03:06 PM)datamweb Wrote: Hi, Ok, so it is an exclusive or and not just an or so that I can use both values (mail or username) randomly. Well, since still beta, I will better stay with Myth\Auth. No rework of authentication tables necessary and the password change process is already included Just thought the rework for new app version would be a good time to switch to "buildin" authentication. |
Welcome Guest, Not a member yet? Register Sign In |