Security & Login Problem


#1

I have access problem with Security & Login
it does not work well


#2

We need more information. ‘Does not work well’ could mean anything. What part are you having trouble with and have you followed the tutorials?

https://wappler.io/docs/#Security-and-Login


#3

If it’s a 500 Server Error when securing a page, v1.0.5 fixes this (error in the path to the include file).


#4

I have a problem with security and login as well. What is new? :rofl:
I followed https://wappler.io/docs/#Setting-Site-Security-Settings and https://wappler.io/docs/#Create-Log-In-Page but when trying to login I get {“identity”:“1”}.
The login form is here: http://www.testworks.nl/content/
Username: admin
Password: admin1
No harm can be done as this is only for testing purposes


#5

The path to App Connect js file is wrong, it is a local path - it can’t be local path… how did you insert on your page? Are you sure you worked on a page located in a site definition?


#6

Thanks Teodor. I Always seem to surprise myself by doing things wrong. Working now


#7

If you create a new page and add Bootstrap/App Connect before saving the file, this is how Wappler is creating the paths - at least it is on my computer (Windows). I don’t remember this happening before the last update, but I could be wrong. If you save the file first, it’s not a problem.


#8

Good catch Tom!
It should fix the path as soon as you save the file. We will improve this in this week’s update.


split this topic #9

24 posts were split to a new topic: Static security provider not working


#10

Hello,
I’m trying to follow this tutorial but I’m doing something wrong.

My setup is a local WAMP server with Mysql and Wappler 1.9.7, using Chrome and Firefox to test the web app.

Im following the login in tutorial on the forum, and, besides the fact that the form ‘type’ on the App Structures does not change to ‘Server Connect Form’ once I do the Step 13, which probably changed between versions, the error actually comes when submiting the form.

The Submit action itself seems to be working but I’m being taken to an URL like this
http://localhost/PROYECT_NAME/dmxConnect/api/admin/ACTION_NAME.php.

If the login was OK it shows an {“identity”:1} on the body of the action file.php, and if it was a KO then it shows an ‘Unauthorized’ text on the body.

I have added both dynamic events on the browser element, one as an alert and the other one as a redirect, but it seems to be doing nothing with it.

I have already tried this tutorial, and another that follows this exact steps (plus some cosmetics) and both end up the same.

Can someone tell me what exactly should be fixed?

Thanks


#11

I have used the unauthorised event to send a message as in


#12

Hi Ben,

Yes, me too, the problem is that it is not showing any alert, even tough it has been set as you did. It takes me to another PHP page, the login_action.php I created on the server actions, if the login was OK it shows the {“identity”:1} and if its not OK it shows the “Unauthorized” text.

This is how I’m configuring the alerts

And this is the form configuration

Any Ideas? I have checked the URL on the code and it seems to be pointing to the right files.

Thanks in advance for all your help

EDIT: I have tried using the go to of the browser to take it to another page and it stills behaves the same, only showing the login_action.php with the result of the query (and the query is working ok so that’s not the problem=


#13

Have a look ate what @Hyperbytes bytes has produced https://www.youtube.com/watch?v=QnvVagY3LGM


#14

Manuel, i strongly recommend using the “Notifications” action in place of the browser1.alert(). If is a much cleaner solution


#15

Hello Hyperbytes,

Yes, Following the advice of @ben I simply started a New project (now with version 1.9.8) and followed the tutorial you made. Now it is working fine, with the notifications and the redirect to the new page on login success so, I’m not really sure what was wrong with my previous page, but luckily now it’s perfect.

Thanks to both of you.