# react-account-kit-web

> React Component for Account Kit

Latest version **0.1.0** (published 2016-11-19) · Apache-2.0 license · 0 weekly downloads

## Install

```sh
npm install react-account-kit-web
pnpm add react-account-kit-web
yarn add react-account-kit-web
bun add react-account-kit-web
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.0 |
| Published | 2016-11-19 |
| First published | 2016-11-18 |
| Weekly downloads | 0 |
| License | Apache-2.0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 7 |
| Author | Donnie Flood |
| Maintainers | floodfx |
| Keywords | account-kit, react |

## Links

- npm: https://www.npmjs.com/package/react-account-kit-web
- Repository: https://github.com/floodfx/react-account-kit-web
- Homepage: https://github.com/floodfx/react-account-kit-web#readme
- Issues: https://github.com/floodfx/react-account-kit-web/issues
- npm.io page: https://npm.io/package/react-account-kit-web

## Dependencies (2)

- [lokka](https://npm.io/package/lokka.md) 1.7.0
- [lokka-transport-http](https://npm.io/package/lokka-transport-http.md) 1.6.1

## Alternatives

- [mobx-react](https://npm.io/package/mobx-react.md) — 2.8M weekly downloads
- [rc-tree](https://npm.io/package/rc-tree.md) — 2.6M weekly downloads
- [@react-oauth/google](https://npm.io/package/@react-oauth/google.md) — 1.3M weekly downloads
- [@wagmi/connectors](https://npm.io/package/@wagmi/connectors.md) — 877.0K weekly downloads
- [vee-validate](https://npm.io/package/vee-validate.md) — 836.4K weekly downloads

## Recent versions

- 0.1.0 (latest) — 2016-11-19
- 0.0.1 — 2016-11-18

## README

# react-account-kit-web
[React](https://facebook.github.io/react/) Component and [GraphQL](http://graphql.org/) server for [Account Kit](https://developers.facebook.com/docs/accountkit)

### Not for standalone use
React Component and GraphQL server were designed and developed for using together.

## React Component
### Install
```bash
npm install --save react-account-kit-web
```
### Components
```javascript
import { AccountKitWeb, AccountKitWebClient } from 'react-account-kit-web';
```
#### AccountKitWeb
`AccountKitWeb` is the React component that loads the AccountKit javascript code
and initializes it using data returned from the GraphQL server.  It expects to be passed
a `AccountKitWebClient` initialized with the url for the GraphQL server.  Also requires an
`onInit` function and accepts an optional `debug` flag.

```javascript
constructor(props) {
  super(props);
  this.accountKitWebClient = new AccountKitWebClient('http://localhost:8080/graphql');
  ...
}
...
render() {
...
  <AccountKitWeb
    onInit={this.onInit}
    client={this.accountKitWebClient}
    debug={true}
  />
...
}
```


## GraphQL Server
### Install
```
git clone --depth=1 --branch=master git@github.com:floodfx/react-account-kit-web.git temp
rm -rf temp/.git
mv temp/graphql-server .
rm -rf temp
```
#### Suggestions?
Open an issue if you have thoughts on how we could make this better.

### Run
```bash
node index.js --AK_APP_ID=YOUR_FACEBOOK_APP_ID --AK_APP_SECRET=YOUR_FACEBOOK_APP_SECRET
```
#### Configuration Settings
- AK_APP_ID (required) - your Facebook App ID (enabled with Account Kit)
- AK_APP_SECRET (required) - your Facebook App Secret
- AK_APP_VERSION (optional) - your Facebook App Account Kit Version (defaults to `v1.1`)
- CSRF (optional) - Token used against Cross Site Request Forgery (defaults to a generated GUID)

## Example
See `example/basic` folder for a working example React App.

### Note
The React app in `example/basic` was generated using the [Create React App](https://github.com/facebookincubator/create-react-app) Project.

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