TokenAccess is undefined

Hi, actually i’m implementing okta auth.
When using okta-react with my SPA okta application that I’ve setup for the dev environment I’m using the useOktaAuth() hook to get the authState and authService objects. But as a result i have got:

{
    "isPending": false,
    "isAuthenticated": false,
    "idToken": undefined,
    "accessToken": undefined,
    "refreshToken": undefined
}

Maybe someone know what could go wrong?

It looks like isAuthenticated is also reporting false, which at least matches the missing tokens. When are you checking the state where you see these all as false/undefined, is this before user authenticates?

If you haven’t yet, you might want to check out our React sample and see if that at least works for you.

1 Like