Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/alopes/google-oauth2-token-info
oauth2 v3 token info
https://github.com/alopes/google-oauth2-token-info
google-api npm-package oauth2 token-authetication
Last synced: 18 days ago
JSON representation
oauth2 v3 token info
- Host: GitHub
- URL: https://github.com/alopes/google-oauth2-token-info
- Owner: alopes
- Created: 2017-05-14T12:27:44.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2017-05-14T12:52:23.000Z (over 7 years ago)
- Last Synced: 2025-01-02T08:03:59.950Z (23 days ago)
- Topics: google-api, npm-package, oauth2, token-authetication
- Language: JavaScript
- Size: 14.6 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# google-oauth2-token-info
## Installation
The library is distributed on `npm`. In order to add it as a dependency,
run the following command:~~~~ sh
$ npm install google-oauth2-token-info --save
~~~~## Usage
~~~~ js
var tokenInfo = require('google-oauth2-token-info');const token = '123abc...' // example token
tokenInfo(token)
.then(data => {
console.log(data);
});
~~~~#### Response for a valid token
~~~~ js
{
azp: "xxxxxxxxxxx",
aud: "xxxxxxxxxxx",
sub: "xxxxxxxxxxx",
hd: "xxxxxxxxxxx",
email: "xxxxxxxxxxx","xxxxxxxxxxx",
email_verified: "xxxxxxxxxxx",
at_hash: "xxxxxxxxxxx",
iss: "xxxxxxxxxxx",
iat: "xxxxxxxxxxx",
exp: "xxxxxxxxxxx",
name: "xxxxxxxxxxx",
picture: "xxxxxxxxxxx",
given_name: "xxxxxxxxxxx",
family_name: "xxxxxxxxxxx",
locale: "xxxxxxxxxxx",
alg: "xxxxxxxxxxx",
kid: "xxxxxxxxxxx"
}
~~~~