I have mimicked the suggestions of integrating Okta with my ReactJS app. In my app.js I have (parameters redacted) return ( <Router> <Security issuer='' clientId='' redirectUri={window.location.origin + '/implicit/callback'} onAuthRequired={onAuthRequired} pkce={true} > <Route path='/' exact={true} component={Home} /> <Route path='/login' render={() => <Login baseUrl='' />} /> <Route path='/implicit/callback' component={ImplicitCallback} /> <Routes /> </Security> </Router>
When I try to login via ‘/login’, when I submit my username and password the first time, I get this warning and I have to enter my credentials again to get it to go through (I assume mounting some component).
Can't perform a React state update on an unmounted component. This is a no-op, but it indicates a memory leak in your application. To fix, cancel all subscriptions and asynchronous tasks in the componentWillUnmount method. in ImplicitCallback (created by Secure) in Secure (created by withAuth(ImplicitCallback)) in withAuth(ImplicitCallback) (created by Route)
Seems like the ImplicitCallback is creating a memory leak but i’m not sure why or how since I don’t have control over that. Please help!