Login form button not working

Need some help with best way to debug this to see what I have wrong, I just want the login form to try to login a user from a database and go to another page if credentials match or get an alert if not found in database, but when I click on the button nothing seems to happen, I must of missed something.

I followed the first two items here

Security and Login Docs

Here’s a screenshot, any ideas of what to check is appreciated, thanks in advance.

Amedeo

Your form input names do not correspond with the posted values, eg. Email vs email

1 Like

Thanks Ben, fixed that, I had the database names instead of form names, but button still does not seem to do anything.

Could you show the Users & Permissions dialog as per

Please check the following tutorial and check if there’s an error displayed when you try to log in:

I initially did not have any values in here, added the info below, I did not add however any permission, I just want if email and password match allow login. Now my page won’t display in browser, I just a blank page with the following message: Unauthorized

Thanks Ben

  1. Request URL:

127.0.0.1/event/dmxConnect/api/Data/invitees.php

  1. Request Method:

GET

  1. Status Code:

401 Unauthorized

  1. Remote Address:

127.0.0.1:80

  1. Referrer Policy:

no-referrer-when-downgrade

Are you sure your form is not set to autosubmit?
Please provide a link to your page where we can check what’s wrong, as if you follow the tutorials in the docs security section everything should be working fine.

Thanks Teodor, no it’s not set to auto submit, but somehow its locking me out. I currently don’t have a web server at this time to send you a link, it’s just set up locally.

Check out ngrok

Thanks Niall, I signup, that was helpful. Here’s what I found out. When I run the page using the ngrok it actually works perfect, so now it seems like a local permissions issue which I don’t understand because everything was working perfect and I could see the page prior to adding the security provider table values. Any ideas?

wapplerlogin3

Thanks,
Amedeo

You sure your password column in the database is “internalId”? Might be helpful to see your Security Login step. The mistake I made was that I wasn’t salting my password with the same salt string when registering a new user and when attempting to login.

Yes Database field is internalID, but the form field name is password. Here’s a few more screenshots.
I do see unauthorized on the browser if invalid credentials alert pop-up, but that should not stop page from loading initially, strange but as mentioned above using the ngrok the page loads fine from the outside and works fine.

What are you using as a local server?

1 Like

@adicarlo
This makes no sense to me. It’s the same server and ngrok just makes your local network address available outside of the local network.

Is it possible to make a small video what exactly happens when you load your page (not the server action!) in your browser?

XAMPP v3.2.2

Here’s more info, if I click on open in browser, it tries to open the following now:
127.0.0.1/event/dmxConnect/api/Data/invitees.php

instead of 127.0.0.1/event/index.php

other pages I open with Wappler open up fine with the browser, but this one for some reason shows the dmxconnect/api/data/invitees.php

if I remove this and replace it with index.php directly in the browser it works.

Made me look at my project settings and I just found my issue, I had the links relative to documents and had to change to root. Strange that it worked fine up until I added the the security provider table values.

Hopefully this will help someone else that makes the same mistake. Thanks to all that took the time to help. Below are my changed setting.

2 Likes

It should not really matter what is selected, unless your folder configuration on the local and server setup are different. I.e. if on the server you are working in a subfolder in the root things will mess up, if you have not properly set up your site.

Glad you found the issue!

I’m now having an issue that Wappler is adding a leading slash prior to all my links, looks fine in wappler, but when I click on view browser I lose my styling. My project settings are shown above.

Changing this: <link rel="stylesheet" href="bootstrap/4/css/bootstrap.min.css">
to this everytime I hit save on a file: <link rel="stylesheet" href="/bootstrap/4/css/bootstrap.min.css">

Thanks,
Amedeo

Well, links set to site root relative start with /
I am pretty sure you are using different folder structures for local and remote target and that’s causing it.
Either select the root folder of the remote target properly or make sure the folder structures are the same…
Or just use page relative links. But make sure your targets are properly setup.

I’m using the same folder to work in locally, since I have no other server remotely…sorry for my ignorance but I’m coming off DW CS6 classic asp so this is all new to me with Wappler/XAAMP and PHP, trying to make the switchover. below were my settings and I was able to view and test site locally and get same results when viewed in browser, how can I accomplish the same environment with Wappler? what do I have wrong with my project settings screenshots above?