# tb-vue-google-login

> A Vue google-login-plugin

Latest version **1.0.14** (published 2019-03-24) · MIT license · 0 weekly downloads

## Install

```sh
npm install tb-vue-google-login
pnpm add tb-vue-google-login
yarn add tb-vue-google-login
bun add tb-vue-google-login
```

## 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.0.14 |
| Published | 2019-03-24 |
| First published | 2019-03-04 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 8 |
| Unpacked size | 23.6 KB |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| Author | tbalint19 |
| Maintainers | tbalint19 |
| Keywords | Vue, VueJS, social, plugin, social-login-plugin, google, google-login |

## Links

- npm: https://www.npmjs.com/package/tb-vue-google-login
- Repository: https://github.com/tbalint19/tb-vue-google-login
- Homepage: https://github.com/tbalint19/tb-vue-google-login#readme
- Issues: https://github.com/tbalint19/tb-vue-google-login/issues
- npm.io page: https://npm.io/package/tb-vue-google-login

## Dependencies (8)

- [vue](https://npm.io/package/vue.md) ^2.5.2
- [bootstrap](https://npm.io/package/bootstrap.md) ^4.0.0-beta.2
- [popper.js](https://npm.io/package/popper.js.md) ^1.12.9
- [bootstrap-vue](https://npm.io/package/bootstrap-vue.md) latest
- [@fortawesome/fontawesome](https://npm.io/package/@fortawesome/fontawesome.md) ^1.1.5
- [@fortawesome/vue-fontawesome](https://npm.io/package/@fortawesome/vue-fontawesome.md) 0.0.22
- [@fortawesome/fontawesome-free-solid](https://npm.io/package/@fortawesome/fontawesome-free-solid.md) ^5.0.9
- [@fortawesome/fontawesome-free-brands](https://npm.io/package/@fortawesome/fontawesome-free-brands.md) ^5.0.9

## 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

- 1.0.14 (latest) — 2019-03-24
- 1.0.11 — 2019-03-05
- 1.0.10 — 2019-03-05
- 1.0.9 — 2019-03-05
- 1.0.8 — 2019-03-05
- 1.0.7 — 2019-03-04
- 1.0.6 — 2019-03-04
- 1.0.5 — 2019-03-04
- 1.0.4 — 2019-03-04
- 1.0.3 — 2019-03-04
- 1.0.2 — 2019-03-04
- 1.0.1 — 2019-03-04
- 1.0.0 — 2019-03-04

## README

# Vue google login plugin

### Usage
Install in your VueJS project:

```bash
npm i -s tb-vue-google-login
```

Import in __main.js__ and install:

```javascript
import GoogleLoginPlugin from 'tb-vue-google-login'

Vue.use(GoogleLoginPlugin, { login: "http://your-website.com/api/login" })
// /login will receive { "token": "ejysdfusdh.alfjsdk.sdfsdfds" }
```

A global _google-login-component_ tag will be installed.<br>

Add the following tags to your index.html:
```html
<meta name="google-signian-scope" content="profile email">
<meta name="google-signin-client_id"
  content="your-client-id.apps.googleusercontent.com">
<script src="https://apis.google.com/js/platform.js" async defer></script>
```

Use _google-login-component_ in any component you wish:

```html
<template>
  <div id="auth-popup">
    <google-login-component
      @loginSuccess="loginSuccessHandler">
    </google-login-component>
  </div>
</template>
```

<hr>

And you are good to go!

Emitted events and props:

```html
<template>
  <div id="auth-popup">
    <google-login-component

      @loginSuccess="methodCalledWhenLoginIsCompletedOnYourSite"

      @authSuccess="methodCalledWhenGoogleAuthTokenArrived"

      @loginFail="methodCalledWhenLoginFailedOnYourSite"

      @authFail="methodCalledWhenGoogleAuthFailed">

    </google-login-component>
  </div>
</template>
```

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