Redirect user to custom page after login then redirect back

Hi,

I’m currently searching how to redirect my users to a custom page after they sign in, I could use the global redirect option but there is some issues using this :

  • You can’t forward the app context to the custom page as a parameter (from the Okta Widget page it would look like :
    window.location.replace([App_URL]+ "?app=OktaUtil.getRequestContext().target.name"

  • If you sign in using the app URL and not trying to access dashboard, you will not use the Global Redirect option

Modifying the Okta Sign in Widget, there is not way to change the redirection within in (or I didn’t not found how to achieve this).

Wanted scenario seems pretty simple and I found weird that Okta does not allow to do something like that :

  1. User sign in (to dashboard or app)
  2. User has never looked at Global terms & conditions or something like that (using an attribute)
  3. User gets redirected to an external webpage (this could happen before step 2. if not feasible in Okta)
  4. User accept whatever shows up
  5. User get redirected back to what we wanted to access

You can try to create a bookmark app which points to your “terms and conditions page” and set a check-box to “auto-launch this app”. Never tried on my own, but it may work, I think.

From that app you would return a user back to Okta Dashboard, after they read and accept your Terms

This would work if the use case was only for Okta dashboard.

If the user is accessing any other app, we would loose app context and won’t be redirected back to right app.

That’s why I wanna use the Sign In widget, because there is an app_context object.