Restricting multiple sessions per user in Oracle APEX
Introduction: This document explains the implementation of Multiple Session Restriction in Oracle APEX applications. The objective of this solution is to ensure that a single user cannot maintain multiple active sessions at the same time across different browsers, devices, or tabs. Why We Need to Do This? Restricting multiple sessions per user is a crucial requirement for maintaining both security and control within an Oracle APEX application. Allowing the same user account to be logged in from multiple devices or browsers simultaneously can lead to risks such as credential sharing, data misuse, and difficulty in tracking true user activity. How Do We Solve It? STEP 1: In APEX Application Go to Page 0 and Create Page Item (P0_ACTIVE_SESSION). STEP 2: Create Dynamic Action, Event :On Page Load Name : Find active session Items to Return : P0_ACTIVE_SESSION Client-Side Condition : Item is null (P0_ACTIVE_SESSION) Server-Side Condition : Current page != Page Value : 9999 TRUE ACTION 1 : Plsql Code:- Declare …
Read More