Nextcloud helpers related to authentication and the current user
yarn add @nextcloud/authnpm install @nextcloud/auth --saveimport {
getRequestToken,
getCurrentUser,
onRequestTokenUpdate,
} from '@nextcloud/auth'
const user = getCurrentUser()
if (user.isAdmin) {
// do something
}For more imformation check nextcloud.github.io/nextcloud-auth