UNPKG

@nextcloud/auth

Version:

Nextcloud helpers related to authentication and the current user

17 lines (16 loc) 479 B
/** * SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: GPL-3.0-or-later */ /** * Get the CSP nonce for script loading * * @return Current nonce if set * @example When using webpack this can be used to allow webpack to dynamically load additional modules: * ```js * import { getCSPNonce } from '@nextcloud/auth' * * __webpack_nonce__ = getCSPNonce() * ``` */ export declare function getCSPNonce(): string | undefined;