useSession()
The useSession() hook provides access to the current user's Session object, as well as helpers for setting the active session.
useSession() returns
isLoaded boolean
A boolean that is set to false until OneAuxilia loads and initializes.
isSignedIn boolean
A boolean that is set to true if the user is signed in.
session Session
Holds the current active session for the user.
How to use the useSession() hook
The following example demonstrates how to use the useSession() hook to access the SignIn object, which has the lastActiveAt property on it. The lastActiveAt property is used to display the last active time of the current session to the user.
home.tsx
Last updated