Automatic
import SignIn from '../components/SignIn'
...
<SignIn />import { useAppContext } from '../Context' //If you're in a subfolder, adjust the path
...
const { currentUser } = useAppContext()
...
const isAuthenticated = (currentUser != null)
if (isAuthenticated) {
const firstName = currentUser.firstName
const userId = currentUser.userId
}Last updated