@wristband/react-client-auth
Version:
A lightweight React SDK that pairs with your backend server auth to initialize and sync frontend sessions via secure session cookies.
25 lines (23 loc) • 952 B
JavaScript
;
/**
* Authentication status enum representing the possible states of user authentication.
*
* This enum is used throughout the authentication flow to represent the current state
* of the authentication process and helps components determine what UI to display.
*/
exports.AuthStatus = void 0;
(function (AuthStatus) {
/**
* The authentication state is currently being determined. This is the initial state during session validation.
*/
AuthStatus["LOADING"] = "loading";
/**
* The user is successfully authenticated with a valid session. Protected resources can be accessed in this state.
*/
AuthStatus["AUTHENTICATED"] = "authenticated";
/**
* The user is not authenticated or the session is invalid. Access to protected resources should be denied in this
* state.
*/
AuthStatus["UNAUTHENTICATED"] = "unauthenticated";
})(exports.AuthStatus || (exports.AuthStatus = {}));