2.5.1 • Published 8 months ago
@nextcloud/auth v2.5.1
@nextcloud/auth
Nextcloud helpers related to authentication and the current user
Install
npm install @nextcloud/auth --saveyarn add @nextcloud/authUsage
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
}