npm.io
2.6.0 • Published 4 months ago

@nextcloud/auth

Licence
GPL-3.0-or-later
Version
2.6.0
Deps
3
Size
72 kB
Vulns
0
Weekly
0
Stars
10

@nextcloud/auth

REUSE status npm Documentation

Nextcloud helpers related to authentication and the current user

Install

npm install @nextcloud/auth --save
yarn add @nextcloud/auth

Usage

For detailed information check the package documentation.

One example usage to get the current user:

import { getCurrentUser } from '@nextcloud/auth'

const user = getCurrentUser()

if (user.isAdmin) {
  // do something
}

Keywords