passport-google-oauth-token
Advanced tools
Comparing version 1.0.1 to 1.0.2
{ | ||
"name": "passport-google-oauth-token", | ||
"version": "1.0.1", | ||
"version": "1.0.2", | ||
"description": "Google access token authentication strategy for Passport", | ||
@@ -15,3 +15,3 @@ "keywords": [ | ||
"scripts": { | ||
"compile": "rm -rf lib && babel src --out-dir lib", | ||
"compile": "rm -rf lib && babel src --out-dir lib && cp types/index.d.ts lib", | ||
"prepublish": "npm run compile", | ||
@@ -30,2 +30,6 @@ "test": "mocha --require babel-core/register test" | ||
"devDependencies": { | ||
"@types/express": "^4.17.2", | ||
"@types/passport": "^1.0.2", | ||
"@typescript-eslint/eslint-plugin": "^2.15.0", | ||
"@typescript-eslint/parser": "^2.15.0", | ||
"babel-cli": "^6.26.0", | ||
@@ -40,6 +44,8 @@ "babel-core": "^6.26.3", | ||
"eslint": "^6.8.0", | ||
"eslint-config-typescript": "^3.0.0", | ||
"husky": "^3.1.0", | ||
"lint-staged": "^9.5.0", | ||
"mocha": "^6.2.2", | ||
"sinon": "^8.0.1" | ||
"sinon": "^8.0.1", | ||
"typescript": "^3.7.4" | ||
}, | ||
@@ -46,0 +52,0 @@ "lint-staged": { |
@@ -57,5 +57,45 @@ # passport-google-oauth-token | ||
Clients can send requests to routes that use passport-google-oauth-token authentication using query parms, body, or HTTP headers. Clients will need to transmit the `access_token` | ||
Clients can send requests to routes that use passport-google-oauth-token authentication using `query parms`, `body`, or `HTTP headers`. Clients will need to transmit the `access_token` | ||
and optionally the `refresh_token` that are received from google after login. | ||
## Options | ||
| Field | Description | Default Value | | ||
| ------------------ | --------------------------------- | --------------------------------------------- | | ||
| clientID | Google's client id | | | ||
| clientSecret | Google's client secret | | | ||
| tokenURL | Google's oauth2 token url | https://www.googleapis.com/oauth2/v4/token | | ||
| profileURL | Google's scope profile url | https://www.googleapis.com/oauth2/v3/userinfo | | ||
| authorizationURL | Google's oauth2 authorization url | https://accounts.google.com/o/oauth2/v2/auth | | ||
| tokenURLVersion | Version of token url | v4 | | ||
| userinfoURLVersion | Version of profile url | v3 | | ||
| authURLVersion | Version of authorization url | v2 | | ||
## Profile Example | ||
```js | ||
{ | ||
provider: 'google', | ||
id: '1234', | ||
displayName: 'Alpha', | ||
name: { | ||
familyName: 'Lucifer', | ||
givenName: 'Alpha', | ||
}, | ||
emails: [ | ||
{ | ||
value: 'alphanolucifer@gmail.com', | ||
verified: true, | ||
}, | ||
], | ||
photos: [ | ||
{ | ||
value: 'https://google.com', | ||
}, | ||
], | ||
_json: {}, | ||
_raw: {}, | ||
} | ||
``` | ||
## License | ||
@@ -62,0 +102,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
103670
11
297
123
19