# account-realm-client

> client side scripts to authenticate with account-realm provider

Latest version **1.2.4** (published 2019-09-16) · MIT license · 0 weekly downloads

## Install

```sh
npm install account-realm-client
pnpm add account-realm-client
yarn add account-realm-client
bun add account-realm-client
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.2.4 |
| Published | 2019-09-16 |
| First published | 2019-01-09 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 66.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | duongtdn |
| Maintainers | duongtdn |
| Keywords | account |

## Links

- npm: https://www.npmjs.com/package/account-realm-client
- Repository: https://github.com/duongtdn/account-realm-client
- Homepage: https://github.com/duongtdn/account-realm-client#readme
- Issues: https://github.com/duongtdn/account-realm-client/issues
- npm.io page: https://npm.io/package/account-realm-client

## Recent versions

- 1.2.4 (latest) — 2019-09-16
- 1.2.3 — 2019-06-28
- 1.2.2 — 2019-06-14
- 1.2.1 — 2019-01-30
- 1.2.0 — 2019-01-30
- 1.0.1 — 2019-01-09

## README

# account-realm-client

## Install

`npm install --save account-realm-client`

## How to use

```javascript
"use strict"

import AccountClient  from 'account-realm-client'

/* realm, app and baseurl are registered with account-realm-core */
const acc = new AccountClient({
  realm: 'realm',
  app: 'dev',
  baseurl: 'http://localhost:3100'
})

/* SSO automatically when script started */
acc.sso( (err,user) => {
  console.log(err)
  console.log(user)
})

/* register events */
acc
  .on('authenticating', () => console.log('authenticating...'))
  .on('authenticated', user => console.log(`authenticated: user: ${user}`))
  .on('unauthenticated', () => console.log('unauthenticated'))
  
  ```
### APIs

TBD, see src/account.js

---
_Source: https://npm.io/package/account-realm-client · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
