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

feat: responseMode uses openid defaults #325

Merged
merged 1 commit into from
Jan 31, 2020

Conversation

aarongranick-okta
Copy link
Contributor

  • responseMode will not be passed to authorize endpoint unless explicitly specified
  • default responseMode for PKCE is "query"

Comment on lines 745 to 750

if (!responseMode) {
// By default Authentication Code flow uses "query", Implicit flow uses "fragment"
// https://openid.net/specs/openid-connect-core-1_0.html#Authentication
responseMode = sdk.options.pkce ? 'query' : 'fragment';
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: Before defining responseMode, you could define defaultResponseMode:

// By default Authentication Code flow uses "query", Implicit flow uses "fragment"
// https://openid.net/specs/openid-connect-core-1_0.html#Authentication
var defaultResponseMode = sdk.options.pkce ? 'query' : 'fragment';
var responseMode = options.responseMode || sdk.options.responseMode || defaultResponseMode;

Arguably this manages the focus a bit better.

@aarongranick-okta aarongranick-okta force-pushed the ag-oidc-defaults-OKTA-243439 branch from a489134 to 6a32ce7 Compare January 31, 2020 03:25
@aarongranick-okta aarongranick-okta merged commit d3bde4a into v3.0 Jan 31, 2020
@aarongranick-okta aarongranick-okta deleted the ag-oidc-defaults-OKTA-243439 branch January 31, 2020 03:40
@aarongranick-okta aarongranick-okta mentioned this pull request Jan 31, 2020
@aarongranick-okta aarongranick-okta mentioned this pull request Mar 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants