Infinite Loop in Redirect Rules Linking Multiple React Apps with Single Session

I’m using the latest react sdk on node 14 - I want to have a user routed to a specific application from a single splash screen

  1. React app splash screen logs user in
  2. based on the user’s (role?) redirect to a different React App
  3. pick up the routing on that React App and display the app

I achieved this with redirect rules by checking the role and redirecting to the specific URL, but when the user hits the new react app, there is an infinite loop of redirecting because it logs in and then redirects again? Is there a better approach than this, or what can I do on the receiving end to get authenticated?

Hi @SvenWritesCode

Are you using /continue from the redirect rule app? This sounds like an anti-pattern use of redirect rules to me.

I think the best approach is to log the user in, add the role to the ID token and have your react app parse the ID token then redirect based on the role

John

Appreciate it. Sending custom claims and is working as expected.

1 Like

Perfect! Glad to hear that!

Thanks for the help.

walgreenslistens

No worries! We are here for you!

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.