Comments (1)
Looks like it to me, otherwise the data
passed to TokenModel
is undefined
.
handle
method in /oauth2-server/lib/handlers/token-handler.js:
.then(function(client) {
return this.handleGrantType(request, client);
})
.tap(function(data) {
var model = new TokenModel(data, {allowExtendedTokenAttributes: this.allowExtendedTokenAttributes});
Also, TokenModel
is looking for client
instead of clientId
and user
instead of userId
.
MemoryCache.prototype.saveToken = function(token, client, user) {
const data = {
accessToken: token.accessToken,
accessTokenExpiresAt: token.accessTokenExpiresAt,
client: client.clientId,
refreshToken: token.refreshToken,
refreshTokenExpiresAt: token.refreshTokenExpiresAt,
user: user.id
};
this.tokens.push(data);
return data;
};
from express-oauth-server.
Related Issues (20)
- Please fix vulnerabilities/warning "Versions of lodash before 4.17.5 are vulnerable to prototype pollution" HOT 2
- Converted to typescript (working code) HOT 2
- "body-parser" should not be dev-dependency HOT 2
- Generator Function without yelt
- Travis
- Can someone either document or clarify the use case difference between client.id and client.clientId
- Followed the sample but getting 401 for the /public route HOT 1
- Update Lodash to 4.17.21 HOT 2
- Question - is it still under any maintenance? HOT 1
- Is implementing Resource Owner Password Credentials grant type? HOT 1
- oauth not responding HOT 4
- why dont you add a proper working example project in repo?? HOT 1
- app.oauth.authenticate middleware behavior HOT 1
- Mixing `oauth2-server` versions breaks `instanceof` Require
- `/login` and `.token()` usage HOT 1
- Cannot read property '0' of undefined HOT 1
- npm audit said lodash need to update to 4.17.5 or higher HOT 2
- New Example Provided Implementing Authorization Code and Refresh Token HOT 4
- Sent response body cannot be easily accessible in continuing middlewares HOT 2
- Missing parameter 'accessToken' when invoking token() HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from express-oauth-server.