Checking Authentication Status
Overview
The isAuthenticated
boolean allows you to check if a user is logged in.
How to Use
Destructure the boolean from the hook:
const { isAuthenticated } = useJustAuth();
Parameters
No parameters are required for this function.
Example
const { isAuthenticated } = useJustAuth();
if (isAuthenticated) {
console.log("User is logged in");
} else {
console.log("User is not logged in");
}
Last updated