No authState prop being passed

I tried following Add a button to sign in | Okta Developer tutorial but when I try to access this.props.oktaAuth but I get it as undefined.

Any help is appreciated.

  <Router>
    <Security {
      clientId: OKTA_CLIENT_ID,
      issuer: `https://${OKTA_DOMAIN}`,
      redirectUri: 'http://localhost:1337/login/callback',
      scopes: ['openid', 'profile', 'email', 'groups'],
      pkce: true}>
      <Route path="/implicit/callback" component={ImplicitCallback} />
      <Route path="/" component={App}/>

App.js

export default withOktaAuth(class App extends Component {
  constructor(props) {
    super(props)
    console.log(this.props.authState)
  }
...........

}

Package.json
"@okta/okta-auth-js": "^5.6.0", "@okta/okta-react": "^5.1.2",