/auth
Search
K
Comment on page

isAuthenticated

Returns a boolean on whether the user is authenticated (i.e. Are they logged in?).

Usage

import React from 'react';
import { useSlashAuth } from '@slashauth/slashauth-react';
export const Authenticated = () => {
const { isAuthenticated } = useSlashAuth();
return <div>{`Authenticated? ${isAuthenticated}`}</div>;
};

Return Value

boolean
Last modified 10mo ago