Our webapp has different technical pages, that are used as parts of some flows, for example:
- “Your session has ended” page where the user gets redirected when their session ends with timeout;
- “You are being authenticated” page, where the user lands right after returning from the authentication provider, while we do our job validating the session, etc;
- GDPR consent page, where the user end up after first login, or after the text of the consent changes;
- and others like that;
Essentially, those are pages that have their own permalinks (we’re trying to make sure that every page refresh keeps you where you were) and are a part of some conditional navigation - sometimes, when the conditions are right, the users get to visit those pages.
Now sometimes the users are sneaky or creative (as users are) and either bookmark one of those pages, or just type those URLs in and get to visit those pages out of appropriate conditions and get confused about what they see there: “Why does it say my session has ended? I clearly still have my session running!”.
At the moment we have some logic that checks if the conditions are right for each page and redirects the users back to dashboard before they even get to see it, so problem solved - if they stumble on some page they aren’t supposed to be on, we just lead them to safety automatically, all good.
My question is: what’s best practice for situations like that?
Should we use status pages (like redirect to 404 as if it does not exist? or 424 even?) like we would when the page isn't found, or they have insufficient access rights?
Should we just account for those events and silently redirect users back to safety? It feels like this way they have no way of learning what they did wrong. But maybe they shouldn't learn?
Should we just render those pages and let them be confused?
Are there any guidelines about that?