PDA

View Full Version : Has anyone created a Login page using a UX component?


ABC123

DaveF
07-07-2013, 10:31 AM
I am developing a mobile app and do not understand how you would use the standard Login or App Launcher component to create a login page that has the same look and feel as a mobile panel card. I have never used Alpha’s security or created a Login page before. It seems like you should be able to use the first panel card as the login page and then call a5ws_login_user() to authenticate. Is there more to it than this?

I followed the Login component code as far as I could using Firebug from the point where the form is submitted. The last thing it does (as far as I can tell) is make an AJAX callback to an Xbasic system login function. I have not been able to test a5ws_login_user yet because I am having some problems with my SQL and/or Active-Link web security tables which I am trying to resolve. It would be nice to know if anyone has been able to do this or if there is a way to use App Launcher and maintain the same look and feel as a panel card.

Thanks

Tbrondolo
07-07-2013, 09:09 PM
Hi Dave

I have made several login panels, some with username and password and one that logs you in based on a choice of pictures and patterns. It is important to get the security working first as it can be very confusing to figure it out without that.

tom

Davidk
07-07-2013, 09:35 PM
I have placed a textbox for username and password on a UX Panelheader and used the security functions from there. However, I don't think I'll have to use it as there are some new Login features coming. From Selwyn...

We are adding integrated login to the UX so that you will have the following options

1. use a standard Login component that redirects to the ux on login
2. use the AppLauncher component and turn on the login feature
3. use the integrated login functionality that is being built into the ux.

DaveF
07-07-2013, 09:37 PM
Thanks. I just got mine working too after troubleshooting a problem I was having with my SQL web security tables. I could not even log in with the old login component. I added a5ws_login_user to my login panel card and it's working great! When I originally created my mobile app, I made a login panel card with a user id and password, but never bothered implementing security until now.

Davidk
07-07-2013, 09:57 PM
Yes... makes it really simple. I haven't added anything for changing password, invalid login etc. I'll wait for the new UX login stuff.

DaveF
07-08-2013, 07:19 AM
Moving forward, is there a best practice in Alpha for having your code remain in a state where it will authenticate the user after login but also allow you to test in Working and Live Preview? The call to a5ws_login_user will fail in Working and Live Preview modes and also if you disable security. I realize you can always comment out the code when testing or maybe even add a5w_FlagWorkingPreviewOrPreview() to your logic before calling a5ws_login_user. My concern is forgetting to uncomment the code or relying on a5w_FlagWorkingPreviewOrPreview() never to fail in production. I don't want to accidentally create a backdoor (or an open door) to the system after moving my app back to production because I forgot to uncomment a line of code or because a bug in the system is causing a5w_FlagWorkingPreviewOrPreview() to return "true".

I hope I am making sense. This is kind of hard to explain.

Thanks

Davidk
07-08-2013, 10:32 AM
Yes, makes sense... not hard to explain... it's a standard software development concern. I make notes on a white board about final delivery checks... stuff that needs to be done before moving code into production. I check that list and then I check my code. Even if I know I've already made those changes... I check it anyway. It's the last thing you should do. Use any kind of reminder system that will work for you and develop the habit of checking it.