Need example please (reactjs): okta hosted signin widget + idp discovery

need example please (reactjs): okta hosted signin widget + idp discovery
the okta reactjs sdk in github says just enable features: {idpDiscovery: true} - I did that, then from okta it takes me to the external IDP and once I login there it takes me back to the okta profile page for the user !!

Then some links said add idpDiscovery: {requestContext: window.location.href} - I did that, it takes me back to my login page, but then how do I get the tokens etc… ?

Need some clear example on this please