2.3.0 • Published 14 days ago

@nextcloud/auth v2.3.0

Weekly downloads
5,330
License
GPL-3.0-or-later
Repository
github
Last release
14 days ago

@nextcloud/auth

Nextcloud helpers related to authentication and the current user

npm Documentation

Install

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

Usage

import {
  getRequestToken,
  getCurrentUser,
  onRequestTokenUpdate,
} from '@nextcloud/auth'

const user = getCurrentUser()

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

For more imformation check nextcloud.github.io/nextcloud-auth