Skip to content

Instantly share code, notes, and snippets.

@Joshscorp
Created July 14, 2022 06:01
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/06c8fce88eeb988cc59003cec77b1b18 to your computer and use it in GitHub Desktop.
Save Joshscorp/06c8fce88eeb988cc59003cec77b1b18 to your computer and use it in GitHub Desktop.
OnzAuth App JS events
auth.on("closed", () => {
setIsLoggingIn(false);
});
auth.on("authenticated", result => {
setIsLoggedIn(true);
updateUserTokens();
});
auth.on("logged_out", () => {
setIsLoggedIn(false);
setUser(null);
});
auth.on("error", error => {
alert(error);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment