FusionAuth
    • Home
    • Categories
    • Recent
    • Popular
    • Pricing
    • Contact us
    • Docs
    • Login
    1. Home
    2. Tags
    3. username
    Log in to post
    • All categories
    • D

      Unsolved Username as the LoginID for forgot password workflow

      Q&A
      • forgot password loginid data.email username • • david 4
      4
      0
      Votes
      4
      Posts
      2.0k
      Views

      mark.robustelliM

      @david-4 , Is this what you are looking for? Using Replacement Variables

    • danD

      Email or phone number to login?

      Q&A
      • phone number username email login • • dan
      2
      0
      Votes
      2
      Posts
      1.4k
      Views

      danD

      Yes. That’s how it currently works.

      We have on the roadmap a more flexible identity system but don't have a current timeline for implementation. Here's the tracking issue: https://github.com/FusionAuth/fusionauth-issues/issues/1

    • danD

      Unique usernames but not unique emails

      Q&A
      • username email uniqueness • • dan
      4
      0
      Votes
      4
      Posts
      2.4k
      Views

      K

      I tried to specify both username and email and I got this error:

      { statusCode: 400, exception: { fieldErrors: { 'user.email': [ { code: '[blank]user.email', message: 'You must specify either the [user.email] or [user.username] property. If you are emailing the user you must specify the [user.email].' } ], 'user.username': [ { code: '[blank]user.username', message: 'You must specify either the [user.email] or [user.username] property. If you are emailing the user you must specify the [user.email].' } ] }, generalErrors: [] } }

      So basically I guess my best bet is to manually enforce uniqueness of username in my backend. But it could have been less cumbersome if I could delegate it to FusionAuth.

      I guess what I am trying to emphasis here is the fact that just by saving username in user.data we will be able to have both username and email but applying rules such as uniqueness would require more manual labor. Cannot we just tell FusionAuth to make sure that user.data.username should be unique in that app or tenant?

      Side note: Since my question is deviating from the OP I'll create a new post and reference this one.
    • danD

      username search against the database?

      Q&A
      • username registrations • • dan
      2
      0
      Votes
      2
      Posts
      886
      Views

      danD

      The user and registration may have a username field. The username field on the user is the one that can be used to login. In general you will want to use the Search API for those types of queries rather than directly accessing the database.

      The reason is because the API is documented and stable, and the database is undocumented and may change.

    • danD

      Can I have users login with either a username and email address, or do I have to pick one or the other?

      Q&A
      • login username email • • dan
      5
      1
      Votes
      5
      Posts
      3.5k
      Views

      T

      @dan I was trying to use the standard register interface from fusion. If I check that I want to use "username" for example, the registration form removes the email option. To circumvent and get both email and username I had to create my own register form.