# google-token-decode

> Get Google access_token and returns user details

Latest version **1.0.2** (published 2017-03-20) · ISC license · 0 weekly downloads

## Install

```sh
npm install google-token-decode
pnpm add google-token-decode
yarn add google-token-decode
bun add google-token-decode
```

## 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.2 |
| Published | 2017-03-20 |
| First published | 2017-03-20 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Maciej Ziehlke mac@dmio.co |
| Maintainers | ziehlke |

## Links

- npm: https://www.npmjs.com/package/google-token-decode
- Repository: https://digitalmio@github.com/digitalmio/google-token-decode
- Homepage: https://github.com/digitalmio/google-token-decode#readme
- Issues: https://github.com/digitalmio/google-token-decode/issues
- npm.io page: https://npm.io/package/google-token-decode

## Dependencies (1)

- [superagent](https://npm.io/package/superagent.md) ^3.5.1

## Recent versions

- 1.0.2 (latest) — 2017-03-20
- 1.0.1 — 2017-03-20
- 1.0.0 — 2017-03-20

## README

# google-token-decode
Get Google access_token and return user details

### Why?
You might find this useful when user gets authenticated on other device and all you need to do is just get his email and name, ie. user logs in on mobile, you need to register local account on server.

### Install
```
npm i google-token-decode
```

### Usage
```
const gtd = require('google-token-decode');

gtd.getData("yourToken", (err, data) => {
  // your logic here
  if(err) {
    console.error(err); return false;
  }
  
  console.log(data);
});

// or with promise

gtd.getData("youtToken")
  .then((data) => { console.log(data); })
  .catch((err) => { console.error(err); });
```

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