We require that once the user signs in through the OKTA sign-in widget, we must automatically redirect the user to the corresponding application based on the group membership.
One approach we thought was to build a router application and redirect the user to the router application URL after signing in. The router application will redirect the user to the corresponding app based on the group membership.
Is there something built in OKTA to achieve this or any other recommended approach?
Unless your users are part of two different brands, I don’t think this will be possible. If users are accessing the Okta org directly and are logging in there, you can ensure they are all routed to the Default App for Sign In Widget configured for each brand, but you won’t be able to configure this more granularly (so that users in Group 1 are routed to one app, and users in Group 2 are routed to another app).
I think your approach, of redirecting ALL users to a router application that CAN determine which group the user is a member of and re-route accordingly, would be the most straightforward solution that can be done in the current product state.
You may want to file a feature request in our Okta Ideas portal, I can see other customers having a similar need and this will allow them to upvote your Idea to signal to our Product team that there is interest in this capability.