React app: using useOktaAuth vs okta config directly

Hi, is there a difference between using useOktaAuth and simply importing export const oktaAuth = new OktaAuth({...}) directly?

I can see that the exported oktaAuth gets updated access token/etc, and it allows usage where hooks are normally not allowed, so I wonder what are the differences.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.