Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/nextcloud-libraries/nextcloud-auth
Nextcloud helpers related to authentication and the current user https://npmjs.org/@nextcloud/auth
https://github.com/nextcloud-libraries/nextcloud-auth
authentication javascript-library nextcloud nextcloud-plugin
Last synced: 15 days ago
JSON representation
Nextcloud helpers related to authentication and the current user https://npmjs.org/@nextcloud/auth
- Host: GitHub
- URL: https://github.com/nextcloud-libraries/nextcloud-auth
- Owner: nextcloud-libraries
- License: gpl-3.0
- Created: 2019-06-19T10:37:37.000Z (over 5 years ago)
- Default Branch: main
- Last Pushed: 2024-10-12T01:55:35.000Z (about 1 month ago)
- Last Synced: 2024-10-16T03:32:38.966Z (about 1 month ago)
- Topics: authentication, javascript-library, nextcloud, nextcloud-plugin
- Language: TypeScript
- Homepage: https://nextcloud-libraries.github.io/nextcloud-auth/
- Size: 3.62 MB
- Stars: 8
- Watchers: 3
- Forks: 3
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
- Authors: AUTHORS.md
Awesome Lists containing this project
README
# @nextcloud/auth
[![REUSE status](https://api.reuse.software/badge/github.com/nextcloud-libraries/nextcloud-auth)](https://api.reuse.software/info/github.com/nextcloud-libraries/nextcloud-auth)
[![npm](https://img.shields.io/npm/v/@nextcloud/auth.svg)](https://www.npmjs.com/package/@nextcloud/auth)
[![Documentation](https://img.shields.io/badge/Documentation-online-brightgreen)](https://nextcloud-libraries.github.io/nextcloud-auth/index.html)Nextcloud helpers related to authentication and the current user
## Install
```sh
npm install @nextcloud/auth --save
``````sh
yarn add @nextcloud/auth
```## Usage
For detailed information check [the package documentation](https://nextcloud-libraries.github.io/nextcloud-auth/index.html).One example usage to get the current user:
```ts
import { getCurrentUser } from '@nextcloud/auth'const user = getCurrentUser()
if (user.isAdmin) {
// do something
}
```