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: support responseMode=query for PKCE flow #324

Merged
merged 1 commit into from
Jan 29, 2020

Conversation

aarongranick-okta
Copy link
Contributor

  • adds support for responseMode="query" if using PKCE flow (server returns an unsupported response mode error if using implicit flow)
  • option can be passed either in SDK constructor or as an option to getWithRedirect and parseFromUrl

README.md Outdated
@@ -197,6 +197,7 @@ tokenManager: {
| `redirectUri` | The url that is redirected to when using `token.getWithRedirect`. This must be pre-registered as part of client registration. If no `redirectUri` is provided, defaults to the current origin. |
| `postLogoutRedirectUri` | Specify the url where the browser should be redirected after [signOut](#signout). This url must be added to the list of `Logout redirect URIs` on the application's `General Settings` tab.
| `pkce` | If set to true, the authorization flow will automatically use PKCE. The authorize request will use `response_type=code`, and `grant_type=authorization_code` will be used on the token request. All these details are handled for you, including the creation and verification of code verifiers. |
| `responseMode` | Applicable only for SPA clients using PKCE flow. By default, when requesting tokens via redirect (Initiated with `token.getWithRedirect` and handled using `token.parseFromUrl`), token values are requested and parsed from the hash fragment. Setting this value to `query` will use the URL search query instead. |
Copy link
Contributor

Choose a reason for hiding this comment

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

Might we want to say WHEN they want to do this?
e.g.
"If your application makes use/alters the hash fragment of the url, you may want to set to this parameter to 'query'."

CHANGELOG.md Outdated

### Features

- [#324](https://github.com/okta/okta-auth-js/pull/324) - Support `responseMode: "query"` for SPA apps using PKCE flow
Copy link
Contributor

Choose a reason for hiding this comment

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

Perhaps?:
Support responseMode: "query" option for SPA apps using PKCE flow"

Copy link
Contributor

@swiftone swiftone left a comment

Choose a reason for hiding this comment

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

Approved with comments

@aarongranick-okta aarongranick-okta force-pushed the ag-responsemode-query-OKTA-269833 branch from ba2077f to d57feec Compare January 29, 2020 19:06
@aarongranick-okta aarongranick-okta merged commit 6e236a4 into master Jan 29, 2020
@aarongranick-okta aarongranick-okta deleted the ag-responsemode-query-OKTA-269833 branch January 29, 2020 20:15
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