v1.3.0

Auth Manager Class

Designed for managing authentication in Bitrix24 applications. It handles authentication data received from the parent window and provides methods for updating and retrieving this data.
// ... /////
$b24 = await initializeB24Frame()
if ($b24.auth.isAdmin) {
    // ... ////
}

Getters

isAdmin

get isAdmin(): boolean

Returns true if the current user has admin rights, otherwise false.

Methods

Implements the AuthActions interface.

getAuthData

getAuthData(): false | AuthData

Returns authentication data AuthData if it has not expired. If expired, returns false.

refreshAuth

async refreshAuth(): Promise<AuthData>

Refreshes authentication data through the parent window and returns the updated data AuthData.

getUniq

getUniq(prefix: string): string

Returns a unique string consisting of the given prefix and AuthData.memberId.

Used in B24PullClientManager