Javascript return to calling app on button click

Hi all - I’m attempting to create a button on the sign in page that takes the user back to the calling app without signing in. ie user tries to login with invalid credentials because we havent set them up in okta so the user could press the button to go back to the original app. I’ve been all over google trying to find the right function and redirect variables to use but haven’t had any luck.

Does anyone have any insight or ideas?


What about just catching that error and then redirecting them by setting the window.location.href?

1 Like

That would work, I’m just having issues finding where the redirect link is stored

Maybe you could do some conditional logic based on requestContext? For example, if clientId == xxx, redirect user to this URL. Or you can instead check the redirect_uri within the same requestContext and redirect the user over to the application based on that (presumably you would want to send them to a main route instead of the callback route)