Open tyteen4a03 opened 3 years ago
yeah, I changed the code to const authTokens = authService.getAuthTokens()
and authTokens.idTokens
to authTokens.id_token
, but still didn't work, the example didn't even load.
The example is out of date it seems. @Goethe0 comment above resolved the issue for me.
` const { authService } = useAuth() const [authTokens, setAuthTokens] = useState(null)
useEffect(() => { console.log(authTokens) if (authService.isAuthenticated()) { setAuthTokens(authService.getAuthTokens()) } }, [authService.isAuthenticated()]) `
I'll have a look at the example. It hasn't been been updated in a while.
The example references this:
but
authTokens
doesn't exist on the object returned byuseAuth
.