
SreedevS.30895 (Customer) asked a question.
On integrating okta with react js I am getting a screen saying "AuthApiError".
Following is the code in react
<Router>
<Security issuer='https://dev-949989.okta.com/oauth2/default'
clientId='0oa2yj7r2qlOTJRTd4x6'
redirectUri={window.location.origin + '/implicit/callback'}
onAuthRequired={onAuthRequired}
pkce={true} >
<Route path='/' exact={true} component={Home} />
<SecureRoute path='/protected' component={Protected} />
<Route path='/login' render={() => <Login baseUrl='https://dev-949989.okta.com' />} />
<Route path='/implicit/callback' component={ImplicitCallback} />
</Security>
</Router>

Hi Sreedev,
You need to add your hostname in Okta as a "Trusted Origins". To do this Login to Okta Admin > Security > API > Trusted Origins > Click on Add Origin and enter your app url e.g http://127.0.0.1:3000