Skip to content

Instantly share code, notes, and snippets.

@Joshscorp
Created July 14, 2022 05:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Joshscorp/0dfc3464e98852f35e07fee3f957d111 to your computer and use it in GitHub Desktop.
Save Joshscorp/0dfc3464e98852f35e07fee3f957d111 to your computer and use it in GitHub Desktop.
OnzAuth App Js Use Effect
useEffect(() => {
if (isLoggedIn) {
updateUserTokens();
navigate('/protected');
}
}, [isLoggedIn, navigate]);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment