# vue-hellojs

> A small wrapper for integrating HelloJs to Vuejs

Latest version **0.0.4** (published 2017-08-01) · MIT license · 0 weekly downloads

## Install

```sh
npm install vue-hellojs
pnpm add vue-hellojs
yarn add vue-hellojs
bun add vue-hellojs
```

## 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.0.4 |
| Published | 2017-08-01 |
| First published | 2017-07-31 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 20 |
| Author | Jacob Goh |
| Maintainers | jacobgoh101 |
| Keywords | vue, hellojs, login, sociallogin, wrapper |

## Links

- npm: https://www.npmjs.com/package/vue-hellojs
- Repository: https://github.com/jacobgoh101/vue-hellojs
- Homepage: https://github.com/jacobgoh101/vue-hellojs#readme
- Issues: https://github.com/jacobgoh101/vue-hellojs/issues
- npm.io page: https://npm.io/package/vue-hellojs

## Alternatives

- [cli-color](https://npm.io/package/cli-color.md) — 3.4M weekly downloads
- [log](https://npm.io/package/log.md) — 1.3M weekly downloads
- [logstash-client](https://npm.io/package/logstash-client.md) — 4.5K weekly downloads
- [@nocobase/plugin-logger](https://npm.io/package/@nocobase/plugin-logger.md) — 2.0K weekly downloads
- [child-process-debug](https://npm.io/package/child-process-debug.md) — 695 weekly downloads

## Recent versions

- 0.0.4 (latest) — 2017-08-01
- 0.0.3 — 2017-08-01
- 0.0.2 — 2017-07-31
- 0.0.1 — 2017-07-31

## README

# vue-hellojs
A small wrapper for integrating [HelloJs](https://github.com/MrSwitch/hello.js) to Vuejs.

HelloJs is a simple and easy to use library for implementing Social Login in web app.

[Demo](https://vue-hellojs-demo.surge.sh)

## How to install:
### CommonJS:
```
npm install --save hellojs vue-hellojs
or
yarn add hellojs vue-hellojs
```

And in your entry file:
```
import Vue from 'vue';
const HelloJs = require('hellojs/dist/hello.all.min.js');
const VueHello = require('vue-hellojs');

HelloJs.init({
  google: GOOGLE_APP_CLIENT_ID,
  facebook: FACEBOOK_APP_CLIENT_ID
}, {
  redirect_uri: 'authcallback/'
});
Vue.use(VueHello, HelloJs);
```

## Usage:
This wrapper bind `hello` to `Vue` or `this` if you're using single file component.

You can `hello` like this:
```
Vue.hello('google').login()

this.hello('google').login()
```

## Example Component
In a .vue component file
```
<template>
  <div>
    <button @click="auth('google')">Google</button>
  </div>
</template>

<script>
export default {
  data() {
    return {

    }
  }, methods: {
    auth(network) {
      const hello = this.hello;
      hello(network).login().then(() => {
        const authRes = hello(network).getAuthResponse();
        /*
          performs operations using the token from authRes
        */
        hello(network).api('me').then(function (json) {
          const profile = json;
          /*
            performs operations using the user info from profile
          */
        });
      })
    }
  }
}
</script>

<style scoped></style>
```

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