We originally created our okta security with version 3 in index.tsx, which is not a react component. The ReactDOM.render there, wrote the Router and Security tags their around our app component defined in App.tsx. in the index.tsx file as well, we had an axios interceptor that got the access token and made a bearer token out it for other purposes.
Now with security tag’s new restoreOriginalUri property, it seems we have to use a react hook (useHistory) to populate a value for the proprty. but you can’t use a hook in a non react component like index.tsx of a create react app solution. What do we do? Following the docs and creating the bearer token in App.tsx seems to be too late and we get an error on early api access that need the bearer token. Uncaught (in promise) AuthSdkError: getUserInfo requires an access token object.