Forum Discussion

cike's avatar
cike
Champion
9 years ago

Change redirect parameter on SSO registration page

Hi guys,

 

users use SSO (Telekom Login) to sign in to our community. On their first login the will be redirected to the SsoRegistrationPage and have to complete their profile. The SSO registration page URL uses an paramater ("dest_url") to redirect the user to a specific location after submitting the form:

 

https://riokc95758.stage.lithium.com/t5/user/ssoregistrationpage?dest_url=https%3A%2F%2Friokc95758.stage.lithium.com%2F

 

Some examples:

- A user writes a new post before logging in the first time, I want the user to be redirected to "postmessageworkflowpage" after leaving SsoRegistrationPage.

- A user gives a Kudo before logging in the first time, I want the user to be redirect to the "Give-Kudo-Workflow-Page" after leaving SsoRegistrationPage.

 

 

Is it possible to set the parameter value via the page init scripts? I want the users to be redirected to different locations depending on cookie settings or actions they do before logging in.

 

 

Thanks and kind regards,

Christian

  • cike - You could use the WebUI context object which would return the registration page URL webUi.getUserRegistrationPageUrl("/")}

     

    and in place of the "/" you can enter the return URL, which can be set as "postmessageworkflowpage". You will have to get the actions whether a user is coming from clicking the kudo or from reply/ post page etc and set your triggers accordingly. As an FYI - please take extra precautions while working inside the page init script, one wrong move and your stage would be unusable and you will have to get in touch with support to get it back.

    • cike's avatar
      cike
      Champion

      VarunGrazitti - Can I change the URL parameter dest_url using the webUi.getUserRegistrationPageUrl("/")}?

       

      I didn't find any Freemarker method to set a URL parameter within the page init scripts.

       

      Christian

       

      • cike - Yes, you can. However, you wouldn't have to change it in the SSO settings under admin as you want this redirect for specific cases only, you can add this to your code like -

         

        webUi.getUserRegistrationPageUrl("www.your_url.com")}