react-oidc-context
react-oidc-context copied to clipboard
Typo in README
Hey,
today I was implementing OIDC using your library. In this process, I think I came across a typo in one of the examples. In the "automatic sign-in" section it says
React.useEffect(() => {
if (!hasAuthParams() &&
!auth.isAuthenticated && !auth.activeNavigator && !auth.isLoading &&
!hasTriedSignin
) {
auth.signinRedirect();
setHasTriedSignin(true);
}
}, [auth, hasTriedSignin]);
I got the snipped to work, by checking for hasAuthParams() instead of !hasAuthParams(). Is this a real typo, or am I making something wrong? By removing the exclamation mark, I got it to work.
i guess the readme is correct, in case of hasAuthParams() the context is a callback and the library itself handles that callback...