A boolean flag indicating if the initial authentication state is being loaded or checked.
Logs in a user with the given credentials.
The user's email address.
The user's password.
Optionaloptions: { twoFactorCode?: string }Optional two-factor code.
A promise describing the outcome.
Logs out the current user, clearing their session data.
Updates the current user object in context and localStorage. Useful after profile updates (name/email).
The currently authenticated user object, or null if no user is logged in.
Defines the shape of the authentication context provided to consumers.