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

node-oauth2-server

Package Overview
Dependencies
Maintainers
1
Versions
33
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

node-oauth2-server - npm Package Compare versions

Comparing version 2.2.1 to 2.2.2

4

Changelog.md
## Changelog
### 2.2.2
- Fix bug when client has multiple redirect_uri's (#84)
### 2.2.1

@@ -4,0 +8,0 @@

8

examples/dynamodb/model.js

@@ -47,3 +47,5 @@ /**

if (data.clientSecret !== clientSecret) return callback();
if (clientSecret !== null && data.clientSecret !== clientSecret) {
return callback();
}

@@ -135,5 +137,5 @@ callback(null, data);

if (expires) code.expires = parseInt(expires / 1000, 10);
console.log("saving", token);
console.log("saving", code);
dal.doSet(token, OAuthAuthCodeTable, { authCode: { S: authCode }}, callback);
dal.doSet(code, OAuthAuthCodeTable, { authCode: { S: authCode }}, callback);
};

@@ -140,0 +142,0 @@

@@ -17,3 +17,3 @@ var model = module.exports;

],
refreshToken: [
refresh_token: [
'thom'

@@ -66,3 +66,4 @@ ]

var elem = oauthClients[i];
if(elem.clientId === clientId && elem.clientSecret === clientSecret) {
if(elem.clientId === clientId &&
(clientSecret === null || elem.client_secret === clientSecret)) {
return callback(false, elem);

@@ -69,0 +70,0 @@ }

@@ -73,3 +73,5 @@ /**

console.log('in getClient (clientId: ' + clientId + ', clientSecret: ' + clientSecret + ')');
if (clientSecret === null) {
return OAuthClientsModel.findOne({ clientId: clientId }, callback);
}
OAuthClientsModel.findOne({ clientId: clientId, clientSecret: clientSecret }, callback);

@@ -76,0 +78,0 @@ };

@@ -118,2 +118,3 @@ /**

}
client.redirectUri = self.redirectUri;
} else if (client.redirectUri !== self.redirectUri) {

@@ -120,0 +121,0 @@ return done(error('invalid_request', 'redirect_uri does not match'));

{
"name": "node-oauth2-server",
"description": "Complete, compliant and well tested module for implementing an OAuth2 Server/Provider with express in node.js",
"version": "2.2.1",
"version": "2.2.2",
"keywords": [

@@ -6,0 +6,0 @@ "oauth",

@@ -129,4 +129,4 @@ # Node OAuth2 Server [![Build Status](https://travis-ci.org/thomseddon/node-oauth2-server.png?branch=2.0)](https://travis-ci.org/thomseddon/node-oauth2-server)

- *string* **clientId**
- *string|number* **userId**
- *date* **expires**
- *object* **user**
- *function* **callback (error)**

@@ -184,4 +184,4 @@ - *mixed* **error**

- *string* **clientId**
- *string|number* **userId**
- *date* **expires**
- *object* **user**
- *function* **callback (error)**

@@ -274,4 +274,4 @@ - *mixed* **error**

- getUser (username, password, callback)
- saveAccessToken (accessToken, clientId, userId, expires, callback)
- saveRefreshToken (refreshToken, clientId, userId, expires, callback) **(if using)**
- saveAccessToken (accessToken, clientId, expires, user, callback)
- saveRefreshToken (refreshToken, clientId, expires, user, callback) **(if using)**

@@ -278,0 +278,0 @@ Provided there weren't any errors, this will return the following (excluding the `refresh_token` if you've not enabled the refresh_token grant type):

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