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

getToken takes only a single set of options #320

Merged
merged 1 commit into from
Jan 29, 2020

Conversation

aarongranick-okta
Copy link
Contributor

No description provided.

@aarongranick-okta aarongranick-okta force-pushed the ag-gettoken-options-OKTA-106994 branch from efb562a to 3b5d7ba Compare January 23, 2020 01:19
CHANGELOG.md Outdated
@@ -22,6 +22,8 @@

- [#317](https://github.com/okta/okta-auth-js/pull/317) - `pkce` option is now `true` by default. `grantType` option is removed.

- [#320](https://github.com/okta/okta-auth-js/pull/320) - `getWithRedirect`, `getWithPopup`, and `getWithoutPrompt` take a single options object
Copy link
Contributor

Choose a reason for hiding this comment

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

Wouldn't a more informative note say what has been dropped? If I'm passing two options today, and the CHANGELOG tells me I should only send one, I don't know which one.

function getWithoutPrompt(sdk, oauthOptions, options) {
var oauthParams = util.clone(oauthOptions) || {};
util.extend(oauthParams, {
function getWithoutPrompt(sdk, options) {
Copy link
Contributor

Choose a reason for hiding this comment

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

The README uses "oauthOptions", which does have the advantage of being more specific. Is there a reason to make it more generic? (If so, we should update the README to match, but hopefully we can go with the descriptive, um, option)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The reason there were 2 sets of options is because the first set was supposed to correspond to the OAUTH 2.0 spec, whereas the 2nd set included our "internal" options. Over time, the set of options we support has drifted from this original intention. Now that they are merged, there is no distinction. All options are part of OUR spec and may not necessarily map directly to the OAUTH 2.0 spec. So I think the README should be updated

@aarongranick-okta aarongranick-okta force-pushed the v3.0 branch 2 times, most recently from 937963b to 7ccdf7c Compare January 29, 2020 21:04
@aarongranick-okta aarongranick-okta force-pushed the ag-gettoken-options-OKTA-106994 branch from edcb2e4 to aa70faa Compare January 29, 2020 21:07
@aarongranick-okta aarongranick-okta force-pushed the v3.0 branch 2 times, most recently from bb8730d to 8a29ce5 Compare January 29, 2020 21:45
@aarongranick-okta aarongranick-okta force-pushed the ag-gettoken-options-OKTA-106994 branch from aa70faa to 1d8082c Compare January 29, 2020 22:28
@aarongranick-okta aarongranick-okta merged commit e2b1d21 into v3.0 Jan 29, 2020
@aarongranick-okta aarongranick-okta deleted the ag-gettoken-options-OKTA-106994 branch January 29, 2020 22: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