Skip to main content

Function: hasToken()

function hasToken(cluster: string): boolean

Checks whether an authentication token exists for the given cluster.

Important! This will only work if plugins have overriden getToken function! By default tokens are stored in httpOnly cookies and not available from JS

Parameters

ParameterTypeDescription
clusterstringThe name of the cluster.

Returns

boolean

True if a token exists, false otherwise.

Defined in

src/lib/auth.ts:68