Redirect URI after Okta login

I am implementing okta OAuth 2.0 in spring boot so I enabled Sso in java class and after okta login I want it redirected to my React UI so I am confused about how it could be done. I used HomeController for mapping and tried to return app.js using tomcat jasper dependency it didnt work. Anybody could help me with this ?