Arif Sher Khan
Arif Sher Khan

Reputation: 585

Redirect to home page when opening login page and if session already exist - Oracle Apex

I have an application in which if a user is logged in, and then user opens another tab in same browser and try to open the login page, then the session in first tab gets logged out.

When I am looking for is that instead of logging out the user form first tab and opening the login page in second tab, I want the second tab to go to homepage so that login page is never displayed in second tab.

Sample application - Steps to reproduce.

  1. Go to https://apex.oracle.com/pls/apex/r/ask_dev/test/login
  2. Login using login_test as username and Qwerty@1 as password
  3. Open another tab in same browser, and go to https://apex.oracle.com/pls/apex/r/ask_dev/test/login
  4. Go to first tab and reload the page. The session there will be logged out/ended.

I don't the first step 4 to log out the user just because user loaded the login page in another tab of same browser.

I understand its because there is no session values added to URL when opening the second tab. But adding a session value in standard/general login URL doesn't feel right. I have already added a redirect on login page if user is already logged in using APEX_AUTHENTICATION.IS_AUTHENTICATED. But if there is no session value in URL then this doesn't work.

Upvotes: 0

Views: 115

Answers (0)

Related Questions