auth
/
2.0.0
auth 2.0.0
Install from the command line:
Learn more about npm packages
$ npm install @nextcloud/auth@2.0.0
Install via package.json:
"@nextcloud/auth": "2.0.0"
About this version
Nextcloud helpers related to authentication and the current user
yarn add @nextcloud/auth
npm install @nextcloud/auth --save
import {
getRequestToken,
getCurrentUser,
onRequestTokenUpdate,
} from '@nextcloud/auth'
const user = getCurrentUser()
if (user.isAdmin) {
// do something
}
For more imformation check nextcloud.github.io/nextcloud-auth