Alpha Video Training
Results 1 to 1 of 1

Thread: Multi-Page Login with Session Variables - sample attached

  1. #1
    Member
    Real Name
    Rich Fulham
    Join Date
    May 2011
    Location
    Portland, OR
    Posts
    995

    Default Multi-Page Login with Session Variables - sample attached

    So, I found out a few things about session variables and the multi-page login process that I use:

    1. Sometimes Alpha WAS, and Alpha IIS, tell the browser to do a "GET" on the"Redirect page - login" that has been configured in the project's "Web Security / Security Policy" tab, even though at that time there is no reason to redirect the user, because at that point they are already logged on! When the server subsequently receives that bad redirected "GET" it executes the xbasic in the page, but ends up not sending the response for that page. Maybe it sends another page (the correct page) instead. If you have a secured application where users must have the exact link to your login page then you are in for some trouble. In this case the "Redirect page - login" is not going to be configured as the login page; you don't want to make that page public in this scenario. The only people that should be coming into your site will be using the exact URL to your login page. Your "Redirect page - login" is instead going to be a page that tells them "accessed denied" or some such thing. If you like keeping things tidy, you might also want to blow away any session variables if the user is directed to that page, as you don't really know when Alpha might direct someone to this page. And here lies the problem, session variables that you have setup from previous steps in the login process will be blown away when they should not be, if you are being tidy. So, the suggestion here is to not clear or delete any session variables in the "Redirect page - login", under this scenario.

    2. It is possible the random login failure that I observe in the production copy of my application is due to #1 above, or, more likely, it is due to a timing / synchronization issue. In the production app, session variables are stored in a SQL server database on a separate server than the web server. As mentioned by someone else on these forums, there may always be a timing issue that session variables may not be ready to read after they have been written.

    3. I have mentioned this before, but I will repeat it here: Allowing a user to have multiple tabs or instances of a browser open into your application can be extremely dangerous to the integrity of the database if session variables have anything to do with updateable data fields. Session variables are not unique to the browser's tab or instance:
    https://stackoverflow.com/questions/...ch-browser-tab


    Despite its name, the attached project is for regular Alpha WAS, not IIS. I setup this project to demonstrate why a developer might need a multi-page login process. It starts by using the old Login Component, which if you are following some newer recommendations, you should just abandon along with the multiple a5w pages and go with a UX.

    I probably tested the attached program 50 times over a couple of days before it failed as described in issue # 1, above.
    Attached Files Attached Files

Similar Threads

  1. Replies: 2
    Last Post: 01-07-2019, 03:01 PM
  2. Session variables in mobile login ux not being set
    By rjackson@arach.net.au in forum Mobile & Browser Applications
    Replies: 21
    Last Post: 11-01-2016, 04:22 PM
  3. Session variable not passing back to page unless I reload the page after login
    By jwilliamson in forum Mobile & Browser Applications
    Replies: 6
    Last Post: 08-14-2015, 01:18 PM
  4. UX Login Session Variables
    By hallidayo in forum Mobile & Browser Applications
    Replies: 10
    Last Post: 01-05-2015, 09:16 PM
  5. Login Session Variables
    By marlenel in forum Web Application Server v6
    Replies: 9
    Last Post: 10-18-2005, 04:06 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •