Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow response override #115

Open
thomseddon opened this issue Oct 15, 2014 · 2 comments
Open

Allow response override #115

thomseddon opened this issue Oct 15, 2014 · 2 comments
Assignees
Milestone

Comments

@thomseddon
Copy link
Member

This would also replace the continueAfterResponse

@njj
Copy link

njj commented Mar 7, 2017

For those interested in how to do this, the source code is here:

if (options && options.allowExtendedTokenAttributes) {
this.customAttributes = {};
for (var key in data) {
if (data.hasOwnProperty(key) && (modelAttributes.indexOf(key) < 0)) {
this.customAttributes[key] = data[key];
}
}
}

Just pass, allowExtendedTokenAttributes: true, as an option in the server constructor and any additional properties will populate.

@nanachimi
Copy link

Any idea how to add custom fields to a response body of a token endpoint?
Details: oauthjs/express-oauth-server#67
Source code: https://github.com/nanachimi/oauthserverjs

@thomseddon thomseddon modified the milestones: 3.0.0, 4.1.0 May 28, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants