Question
Coforge
IN
Last activity: 14 Jun 2023 5:31 EDT
Anonymous user to authenticated user - session refresh
Hi,
We are working on a requirement to trigger authentication mechanism for anonymous user (unauthenticated user) by launching local action pyReAuthGadget to capture user credential and to authenticate the user.
On post submit of this local action, expected scenario is the browser session will be refreshed and then authenticated user portal is displayed but no browser refresh is happening, unauthenticated user portal stays the same.
To refresh the browser session post submission of local action, we included reload harness and window.location.reload() as well, still there is no session refresh.
Any solution to overcome this issue?
Thanks!
Pega platform version - 8.4, 8.8
-
Likes (1)
Anoop Krishna -
Share this page Facebook Twitter LinkedIn Email Copying... Copied!
Accepted Solution
Updated: 14 Jun 2023 4:55 EDT
Booz Allen Hamilton
US
@bhavanasahithitested this solution and it worked for me:
1. first add script to UserWorkForm
2. add Run script action to your button. The function name is reloadBrowser
ref: https://support.pega.com/question/how-refresh-browser-clcik-button
Bits in Glass
IN
@bhavanasahithi Is this issue resolved?
Coforge
IN
@Anoop Krishna No, I didn't find any solution
Updated: 23 May 2023 16:22 EDT
Booz Allen Hamilton
US
@bhavanasahithiHi, did you find a solution to this? We are having the same issue
Accepted Solution
Updated: 14 Jun 2023 4:55 EDT
Booz Allen Hamilton
US
@bhavanasahithitested this solution and it worked for me:
1. first add script to UserWorkForm
2. add Run script action to your button. The function name is reloadBrowser
ref: https://support.pega.com/question/how-refresh-browser-clcik-button
Updated: 31 May 2023 5:52 EDT
Coforge
IN
Hi, As suggested we included reloadBrowser function in UserWorkForm and called the function after Re-auth action. This didn't work
Approach-1: Added reloadBrowser function after launching pyReAuthGadget. Post submit of this local action no browser refresh is happening.
Approach-2: In pyReauthenicateForBasic section - Login button action set, added reloadBrowser function.
With this approach, getting following error due to stale transactions.
"This action is not allowed as it is outside the current transaction"
Also we replaced reloadBrowser function with ReloadHarness activity to refresh portal harness. This too didn't work. "This action is not allowed as it is outside the current transaction" message is displayed.
Booz Allen Hamilton
US
@bhavanasahithiThe approach 2 seems to be right. I'm using the same approach and it did not give me that error. Is your action calling reloadBrowser first then refresh section (which is OOTB and should be there when you did save as)
-
Anoop Krishna
Updated: 14 Jun 2023 5:29 EDT
Coforge
IN
Hi @ChensuZ5,
Thanks for the solution! We are able to resolve this issue.
Previously we placed the Login button (that launches pxReAuthGadget local action) in temporary work flow context, which resulted in stale transaction. To overcome this we placed the login button (that launches pxReAuthGadget local action) in portal header, browser refresh is working successfully.
-
Anoop Krishna Su Zhu
Bits in Glass
IN
@bhavanasahithi great to know you have fixed issue. So you have not used login button in ootb section pyReauthenticateForBasic section ?
Coforge
IN
We updated pyReauthenicateForBasic (one of the calling section in pxReAuthGadget local action) - Login button action set, to call reloadBrowser function.
-
Anoop Krishna
TATA Consultancy Services
IN
@bhavanasahithi pyReauthenticateForBasic section is available, pls save as and add your refresh and other configuration in the login button.