Logging in users with a custom form

Hey there,

I created a custom form because I wanted to style it differently then the default form. I have a username input and password input with a submit button. I looked everywhere and can’t seem to find how to log in the user using the custom submit button. On the default form, it asks what database are the users in but for the custom submit button, I don 't see that option. Thanks in advance.

Hey there @mmccray

You gotta go here:

Kinda hidden but it’s there my friend :slight_smile:

Thanks for the response. Yes, I saw the log in option (found it by accident) but was quite confused on how to get this to work. I tried few things changing the options on the Log in options page but was not successful. This log in option doesn’t have the same options as with the default form.

Can you explain what you’re trying to do? The more detail you provide, the better we can assist.

In general, all a user needs is their email address and password to log in.

I just figured it out. I deleted what I had in username and password fields and it works just fine, feel kinda silly right now but I originally thought I had to put something in the fields. Thank you for your time and knowledge!!

Sooo back again, I changed some styling on the form and now I can’t log in anymore. Getting the same error as when I started. I did delete the default login page because I no longer needed it when I got my custom form to work. I noticed that I didn’t have a username set, just an email and password in the database (not sure how the form was logging me in), changed the login type to email and now I can’t log in at all.

Hi @mmccray ,

Those fields should not be empty,
Screen Shot 2022-05-10 at 10.28.23 AM

Also tried it with the username input and password input…no dice

@mmccray you need to login with the Username? if you are putting Username input to the email field you need to choose Username from Email. Try that and see!

I just named the input field username but I will change the input name to see if that works…

I changed the input name to Email, still a no…I’m not sure what I’m doing wrong or if there is a glitch…

Does the user’s information that you are entering in the login form are in the User collection?

Yes…I noticed that since I deleted some screens, the login screen is now been assigned Login and Home screen…When I changed the home screen to another page, now when I click preview, it automatically goes to the Home screen not the login page

Ok, so just created a link from the Home screen back to the Login screen and its still giving me an error invalid username or password. Now, at least I can see the Login screen when I click preview.

Does that still happens after you delete that Login action and reload your tab and add that Log in action again filling the fields with the inputs?

Just tried that (great suggestion) but the error message is still popping up. Even changed the password, still no :sob:

What happens if you change that user’s password or delete that user record and add it again?