# cordova-plugin-digits

> Digits.com for Cordova (iOS and Android)

Latest version **1.1.2** (published 2015-12-07) · MIT license · 0 weekly downloads

## Install

```sh
npm install cordova-plugin-digits
pnpm add cordova-plugin-digits
yarn add cordova-plugin-digits
bun add cordova-plugin-digits
```

## 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.1.2 |
| Published | 2015-12-07 |
| First published | 2015-11-10 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Edmond Leung |
| Maintainers | eleung |
| Keywords | cordova, digits.com, digits, fabric.io, fabric |

## Links

- npm: https://www.npmjs.com/package/cordova-plugin-digits
- Repository: https://github.com/JimmyMakesThings/cordova-plugin-digits
- Homepage: https://github.com/JimmyMakesThings/cordova-plugin-digits#readme
- Issues: https://github.com/JimmyMakesThings/cordova-plugin-digits/issues
- npm.io page: https://npm.io/package/cordova-plugin-digits

## Recent versions

- 1.1.2 (latest) — 2015-12-07
- 1.1.1 — 2015-12-07
- 1.1.0 — 2015-12-07
- 1.0.9 — 2015-12-07
- 1.0.8 — 2015-12-07
- 1.0.7 — 2015-12-07
- 1.0.6 — 2015-12-06
- 1.0.5 — 2015-12-06
- 1.0.4 — 2015-12-06
- 1.0.3 — 2015-12-03
- 1.0.2 — 2015-11-11
- 1.0.1 — 2015-11-10
- 1.0.0 — 2015-11-10

## README

# cordova-plugin-digits

This plugin provides native mobile Digits.com integration for both Android and iOS.

## Installation

This requires cordova 5.0+ (current stable 1.0.1)

    cordova plugin add cordova-plugin-digits --variable FABRIC_API_KEY=your_api_key --variable FABRIC_CONSUMER_KEY=your_consumer_key --variable FABRIC_CONSUMER_SECRET=your_consumer_secret

It is also possible to install via repo url directly (unstable)

    cordova plugin add https://github.com/JimmyMakesThings/cordova-plugin-digits --variable FABRIC_API_KEY=your_api_key --variable FABRIC_CONSUMER_KEY=your_consumer_key --variable FABRIC_CONSUMER_SECRET=your_consumer_secret

## Supported Platforms

 - iOS
 - Android

## Methods

 - window.plugins.digits.authenticate

### window.plugins.digits.authenticate

Initiates the Digits native interface. If successful the `authenticateSuccess` is called,
otherwise the `authenticateFailed` is called instead.

    window.plugins.digits.authenticate(options, authenticateSuccess, authenticateFailed);

#### Parameters

 - **options**: Theming options for iOS.
 - **authenticateSuccess**: The callback that is passed the authenticated info.
 - **geolocationError**: (Optional) The callback that executes if authentication fails.

#### Example

    // Currently only accentColor and backgroundColor is supported.
    // Note: These have no effect on Android.
    const options = {
      accentColor: '#ff0000',
      backgroundColor: '#ffffff',
    };

    window.plugins.digits.authenticate(options,
      (oAuthHeaders) => {
        console.log(oAuthHeaders);
      },
      (error) => {
        console.warn("[Digits]", "Login failed", error);
      }
    );

## Contributors

This plugin is based off the work of another plugin: [https://github.com/cosmith/cordova-digits](https://github.com/cosmith/cordova-digits).

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