Session expiration question

  • 1
  • Question
  • Updated 3 years ago
I have three different levels of SKUID access.

1) Internal Staff who use SKUID as both builders and viewers.
2) Community Members who use SKUID to log into a portal which consists of all SKUID pages after the login.
3) Public Users who log into the Community via Sites and have view access to SKUID without authentication.

The problem I am running into is that for the second group they may abandon a page and perhaps try to refresh it later (after their session has expired). But since the public guest user has View privilages they can see the page (although the correct information is not getting loaded into the models since it depends on the logged in user.) and this is providing some unintended results.

Is there a way for me to run an action based off of a non-authenticated user hitting the page (perhaps redirecting them to the login page?)

Or maybe there is a better way to satisfy the three conditions but lock down the security on some of the Skuid pages.
Photo of Joseph Ucuzoglu

Joseph Ucuzoglu

  • 292 Points 250 badge 2x thumb

Posted 3 years ago

  • 1
Photo of Matt Sones

Matt Sones, Champion

  • 31,986 Points 20k badge 2x thumb
This is a great question. Skuid?
Photo of Joseph Ucuzoglu

Joseph Ucuzoglu

  • 292 Points 250 badge 2x thumb
I ended up using the following inline Javascript to redirect unauthenticated users to the logout page. Seems to be working well for the use case described.

var $ = skuid.$;
if (!skuid.utils.userInfo.isAuthenticated)