Jump to content
  • 0

Login / Logout / Timeout


mgredmond

Question

Can someone point me to some clear understanding of the 

  • Logout Destination
  • Timeout and redirection
  • Login redirection on success

parameters found in the Advanced Settings section of Authentications? They would appear to be intuitive, but they are not.

I cannot find a clear understanding of these values or how and when to use them.  And I am pretty sure they are causing me some problems.

I have created a stand-alone Login page with guidance from the Caspio online help and use the following code:

<script>
if("[@authfield:tbl_Users_IAMgmt^]" == "Yes"){
  window.location = "https://www.google.com";
  }
  else if ("[@authfield:tbl_Users_CollegeRep^]" == "Yes"){
    window.location = "https://www.yahoo.com";
  }
  else{
    window.location = "https://www.bbc.com/news";
}
</script>

Clearly, I have changed the destination URLs from my live site for security reasons, but the point is that different users go to different sites. But I think I am being hindered by the settings of the parameters above. When I changed the LOGIN REDIRECTION ON SUCCESS to CASPIO.COM, that's where I went regardless of who I logged in as. It was if the code above was simply ignored.

And if you tell me WHAT to do, please at the same time tell me WHY to do it.

Thank you in advance. Any assistance is appreciated.

Link to comment
Share on other sites

2 answers to this question

Recommended Posts

  • 0

Your problem is that you are redirecting your users to a site (caspio.com) using the Authentication as well as expecting to redirect using your script. 

You need to set Login Redirection On Success to Same Page. With it like this, you aren't redirecting your users with the actual authentication, they are just staying on the same page, so the script will be able to run, which THEN will redirect users.

Everything else looks like it is set up correctly. The Timeout option is a helpful security feature. If your user is idle on your page for whatever you set that timeout to, they get logged out. However, I believe that includes no activity whatsoever on the page, so even a little click will reset this timeout. 

Logout Destination will be where your users are sent after they are logged out. This could be from either a logout button you make, or from the timeout. I usually set this to the login form itself, so if the user is logged out, they are just sent back to the login form.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...