Custom activity not getting executed for unauthenticated / guest user
I have a requirement for customizing the Pega login screen. Below are the features which are completed:
1. Changed the login screen(with custom css and html Web-Login). 2 buttons are added. SignIn and Create Account
2. On click of SignIn, the general Pega login will take place. using Code-Security.Login
3. On click of Create Account, a html is shown where the guest user is asked to enter his email and click on GenerateOTP button to get the OTP.
4. All the required configurations like setting up the Browser requestor type, Unauthenticated Access group, Adding an unauthenticated RS in the access group etc are take care.
Issue- When the server url is hit, the customized login screen displays. On click of Create Account , when user enters his email and click on Generate OTP, the activity is not getting executed. (Neither the OTP comes nor the next screen is shown where the user is asked to enter the received OTP)
Observation- When I run the preview of Web-Login and then click on Create Account,the functionality works end to end. Meaning for an authenticated user, the activity (on click of Generate OTP) gets executed and so on.
QQ- Do we have any way to run a custom activity when the user is not authenticated yet?
***Edited by Moderator: Pallavi to change content type from Discussion to Question***
Based on the observation you have shared, it appears at run time the Custom Actvity is not running. Please make sure your System's [ Records Explorer, SysAdmin > Requestor Type > "Your System Name"] BROWSER Requestor is able to access to your custom rules.
Thanks @Gumudavelly. The articles above shows how to customize the login screen. This functionality I have already achieved and the user is able to login also after the customizations. The issue which I am facing is that any custom activity called on another button (SignUp) is not getting executed when its a guest user.
1. I click on the button (Generate OTP) as guest user and nothing happens.
2. I go back to the login screen (via an HTML <a href > change link) and then login with my credentials. As soon as I login, I receive the OTP and also the screen is shown where user enters the OTP.
Hence i reached on this conclusion that any custom activity is not getting executed if a user is not authenticated yet.
@AnkitaShukla Can you verify, the Access Roles associated to your Environment's Browser Requestor's access Group. If you are still using PegaRULES:Guest, it may be worth changing to a Access Role something like: PegaRULES:SysAdm4
Other thought is, Trace the Guest User Requestor from Requestor Landing Page of SMA ( if it is older version) to see what is the Operator Context at Run time and does the user able to access your custom rules.
@GUMUDAVELLY . I did figure out a way which resolve the issue. The issue was a Guest user was not able to run an activity which exists inside PRPC as he has not been authenticated yet. The web-logic and the subsequent htmls he can always see as they are plain html which can be opened in a web browser.
hi Anthony. This set up is also done. I followed step by step process of Login screen customization. Adding the unauthenticated ruleset to Unauthenticated access group was one of the step which is taken care.