Skip to main content

TypeAlias.BaseAuth

type BaseAuth = 
| {
isAuthenticated: undefined;
isLoading: true;
user: undefined;
}
| {
isAuthenticated: false;
isLoading: false;
user: null;
}
| {
isAuthenticated: true;
isLoading: false;
user: KeybanUser;
};

Represents the authentication state of the user.

This type can be one of the following states:

  • Loading:

    • user: undefined
    • isAuthenticated: undefined
    • isLoading: true
  • Unauthenticated:

    • user: null
    • isAuthenticated: false
    • isLoading: false
  • Authenticated:

    • user: KeybanUser
    • isAuthenticated: true
    • isLoading: false