# @dashkite/breeze-client

> Web Component and OAuth handler for use with the Breeze authentication API

Latest version **1.1.0-beta.0** (published 2021-09-13) · SEE LICENSE IN LICENSE.md license · 0 weekly downloads

## Install

```sh
npm install @dashkite/breeze-client
pnpm add @dashkite/breeze-client
yarn add @dashkite/breeze-client
bun add @dashkite/breeze-client
```

## Health

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

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.1.0-beta.0 |
| Published | 2021-09-13 |
| First published | 2020-08-06 |
| Weekly downloads | 0 |
| License | SEE LICENSE IN LICENSE.md |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Dependencies | 8 |
| Unpacked size | 47.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Maintainers | dyoder, freeformflow |

## Links

- npm: https://www.npmjs.com/package/@dashkite/breeze-client
- Repository: https://github.com/dashkite/breeze-client
- Homepage: https://github.com/dashkite/breeze-client#readme
- Issues: https://github.com/dashkite/breeze-client/issues
- npm.io page: https://npm.io/package/@dashkite/breeze-client

## Dependencies (8)

- [@dashkite/joy](https://npm.io/package/@dashkite/joy.md) ^0.3.11
- [@dashkite/zinc](https://npm.io/package/@dashkite/zinc.md) ^0.4.0
- [@dashkite/carbon](https://npm.io/package/@dashkite/carbon.md) 4.1.1-beta.6
- [@dashkite/helium](https://npm.io/package/@dashkite/helium.md) ^0.4.1
- [@dashkite/katana](https://npm.io/package/@dashkite/katana.md) ^0.4.8
- [@dashkite/mercury](https://npm.io/package/@dashkite/mercury.md) ^0.3.1
- [@dashkite/mercury-sky](https://npm.io/package/@dashkite/mercury-sky.md) ^0.2.0
- [@dashkite/mercury-zinc](https://npm.io/package/@dashkite/mercury-zinc.md) ^0.4.0

## Recent versions

- 1.1.0-beta.0 (latest) — 2021-09-13
- 1.0.4-beta.3 — 2020-11-17
- 1.0.4-beta.2 — 2020-10-17
- 1.0.4-beta.1 — 2020-10-07
- 1.0.4 — 2020-09-16
- 1.0.3 — 2020-09-15
- 1.0.2 — 2020-09-12
- 1.0.1 — 2020-09-11
- 1.0.0 — 2020-09-09
- 0.7.0 — 2020-09-01
- 0.6.0 — 2020-08-31
- 0.5.0 — 2020-08-27
- 0.4.0 — 2020-08-14
- 0.3.0 — 2020-08-14
- 0.2.0 — 2020-08-06
- … 1 more at https://npm.io/package/@dashkite/breeze-client/versions

## README

# Breeze Client

Web Component for use with the Breeze authentication API.

## Install

```
npm i @dashkite/breeze-client
```

## Usage

In your application, import Breeze Client:

```coffeescript
import "@dashkite/breeze-client"
```

In your markup for your login page, create an instance of the component:

```pug
breeze-connect(
  data-display-name = "Acme, Inc."
  data-domain = "acme.com"
)
```

If the client has not yet authenticated, this will display a list of buttons for each supported provider.

If the client is already authenticated—meaning there is already a profile stored locally—the component will display a success message and generate a `success` event.

If the client state is undefined, the component will attempt to restore a well-defined state, possibly starting with the list of providers.

**Warning:** The component may lose authentication state attempting to restore a well-defined state locally. Your application should attempt to establish a well-defined state prior to loadiing the component.

You may determine the state of local client using the Zinc library. It's the responsibility of your application to try to define an application profile, if applicable. For example, if your application allows for multiple profiles, you should ensure that you determine which profile to use prior to loading the component.

You may determine whether a device is authenticated using the `isAuthenticated` function exported by Breeze Connect.

```coffeescript
import { isAuthenticated } from "@dashkite/breeze-connect"

do ->

  if (await isAuthenticated())
    console.log "Authenticated!"
  else
    console.log "Not yet authenticated."
```

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