I am using the new React SDK (auth0-react) and it is unclear to me what the correct method of detecting an authentication is. That is, how can I detect that a user has been authenticated, whether through a login method or by silently being authenticated upon entering the site. The two login methods return a promise, which solves this problem in instances when a user clicks ‘login’, but this does not apply to silent authentication.
Plainly, how I can I trigger an event when ‘isLoading’ changes from false to true.
Is the only method of resolving this in a class component is to use ‘componentDidUpdate’ and check for change in ‘isLoading’?
Your help is much appreciated