You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

google-token-decode

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

google-token-decode - npm Package Compare versions

Comparing version

to
1.0.1

.npmignore

2

package.json
{
"name": "google-token-decode",
"version": "1.0.0",
"version": "1.0.1",
"description": "Get Google access_token and returns user details",

@@ -5,0 +5,0 @@ "main": "index.js",

# google-token-decode
Get Google access_token and returns 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 = reqiore('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); });
```