Skip to content

@serenity-is/corelib / Authorization / isLoggedIn

Variable: isLoggedIn

isLoggedIn: boolean

Defined in: src/base/authorization.ts:209

Whether the current user is logged in (synchronous).

Remarks

Implemented as a getter over Authorization.userDefinition. Prefer Authorization.isLoggedInAsync to avoid blocking on UserData load. Returns true when UserDefinition.Username is truthy.

Example

if (Authorization.isLoggedIn) {
    // user is authenticated
}