Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

passport-google-oauth-token

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

passport-google-oauth-token - npm Package Compare versions

Comparing version 1.0.6 to 1.0.7

1

lib/Strategy.d.ts

@@ -26,2 +26,3 @@ import OAuth2Strategy from 'passport-oauth2';

userProfile(accessToken: string, done: VerifyCallback): void;
protected _lookupAuthorization(req: Request): string;
protected _lookup(req: Request, field: string): string;

@@ -28,0 +29,0 @@ protected _loadUserProfile(accessToken: string, done: VerifyCallback): void;

4

package.json
{
"name": "passport-google-oauth-token",
"version": "1.0.6",
"version": "1.0.7",
"description": "Google access token authentication strategy for Passport",

@@ -40,3 +40,3 @@ "author": "Alpha",

"oauth": "^0.10.0",
"vitest": "^0.29.8"
"vitest": "^0.31.1"
},

@@ -43,0 +43,0 @@ "scripts": {

@@ -178,2 +178,16 @@ /* eslint-disable @typescript-eslint/naming-convention */

protected _lookupAuthorization(req: Request): string {
if (!req.headers?.authorization) {
return '';
}
const matches = req.headers.authorization.match(/(\S+)\s+(\S+)/);
if (matches?.[1].toLowerCase() !== 'bearer') {
return '';
}
return matches?.[2] || '';
}
protected _lookup(req: Request, field: string): string {

@@ -183,3 +197,4 @@ return (

(req.query && req.query[field]) ||
(req.headers && req.headers[field])
(req.headers && req.headers[field]) ||
this._lookupAuthorization(req)
);

@@ -186,0 +201,0 @@ }

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc