Additional fields in sign-in form

Is it possible to add an extra input field to lock. Along with username password, I need an extra field to identify client.

Our docs and searching are a good starting point:

Yes I looked at docs though I could not find any info for field addition in sign in form. It would be great if you could point to some of the resources.

1 Like

The Lock documentation which is linked in the document referenced above, includes instructions on how to add additional fields Lock Configuration Options

e.g.

var options = {
  additionalSignUpFields: [{
  name: "address",
  placeholder: "enter your address",
  // The following properties are optional
  icon: "https://example.com/assests/address_icon.png",
  prefill: "street 123",
  validator: function(address) {
    return {
       valid: address.length >= 10,
     hint: "Must have 10 or more chars" // optional
  };
 }
},
{  
   name: "full_name",
   placeholder: "Enter your full name"
 }]

}

I think what bharat.mhaskar is trying to ask is for additional fields on login form, not in signup form.

I have a similar question to: Can Auth0 authenticate with custom usermetada to? I need to validate the email, username or document id when submit the login form.

1 Like

Is there any chance that i can use a validator with textfield of type select?

Hello, do we have an answer for the question? is it possible to add additional fields on login form(for example organization id) not on registration form?

Hey there @unkiss!

It seems like this topic has been left there for a while. Let me research it and get back to you as soon as I can!

Hey there @unkiss!

I reached out to appropriate team to see if they have something to share on that front! As far as I can see I can only take a look in customising signup form doc. Will let you know what I found soon!

So basically my findings are as follows:

You can implement your own login forms, for example with Auth0.js, and this could be done either in embedded login scenarios or universal login. You can build UI yourself for login and then use our Authentication API for the login mechanism.

Would you mind sharing the usecase so we can tailor the solution based on your needs?

1 Like

Hey there, have you had a chance to visit my last message?