Skip to content

Use email only for login/registration #144

Closed

Description

@kipchirchirian

I need to use just the email for login/registration. What are the steps to configure or setup this?

Activity

  1. changed the title [-]Use email only[/-] [+]Use email only for login/registration[/+] on May 18, 2022
  2. added
    documentationImprovements or additions to documentation
    questionFurther information is requested
    on May 18, 2022
  3. kenjis commented on May 18, 2022

    @kenjis
    Member

    I've not tried, but how about this?

    1. remove username in the config.

      shield/src/Config/Auth.php

      Lines 216 to 223 in 44901bc

      * Valid login fields
      * --------------------------------------------------------------------
      * Fields that are available to be used as credentials for login.
      */
      public array $validFields = [
      'email',
      'username',
      ];
    2. remove username in the HTML form in src/Views/register.php.
    3. remove username validation rule in RegisterController.
    4. customize the login form.
  4. lonnieezell commented on May 20, 2022

    @lonnieezell
    Member

    Yes, the steps that @kenjis provided will work for you. You should probably copy the views and controller to your application, though.

  5. locked and limited conversation to collaborators on May 31, 2022
  6. converted this issue into a discussion #192 on May 31, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentationquestionFurther information is requested

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions