jaredhanson / jaredhanson/oauth2orize

Support additional request parameters

Open
#137 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
3.5k
Forks
472
PR merge metrics
No merged PRs in 30d

Description

I have to support the `prompt` parameter as defined in [OpenID Connect](http://openid.net/specs/openid-connect-core-1_0.html#AuthRequest).

What is the preferred way to support additional parameters in the authorization call to get accepted als PR?

I thought about passing `req.query` to `issue()` (e.g. in `token.js`):

``` js
var arity = issue.length;
if (arity == 4) {
issue(txn.client, txn.user, txn.res, issued);
} else if (arity == 3) {
issue(txn.client, txn.user, issued);
} else { // arity == 2
issue(txn.req.query, issued);
}
```

Maybe we can also use a more generic object for the parameter:

``` js
var obj = {
client: txn.client,
user: txn.user,
res: txn.res,
parameters: txn.req.query
};
issue(obj, issued);
```

Contributor guide

Open the contributing guide

Research direction

Start with token.js and trace how the authorization call invokes the issue() callback and handles request parameters. Compare the existing callback arities with the proposed parameters object; done requires a settled, backward-compatible way to pass prompt and other authorization parameters.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
api, authentication
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.