@serenity-is/corelib / Authorization / username

Variable: username

username: string

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

Returns the username for currently logged user. Prefer usernameAsync as this one might block the UI if the UserData is not already loaded.

Returns

Username for currently logged user.

Example

if (Authorization.username) {
    // do something
}