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

breaking api change in versions greater than v4.2.6 #1143

Closed
pakwfoley opened this issue Sep 13, 2018 · 7 comments
Closed

breaking api change in versions greater than v4.2.6 #1143

pakwfoley opened this issue Sep 13, 2018 · 7 comments
Labels

Comments

@pakwfoley
Copy link

The Issue

There is a breaking api change in versions greater than v4.2.6. This is in the native redirect uri authorization code flow. Up until then the code response route, after resource owner authentication, was /oauth/authorize/<code> . Now the response is oauth/authorize/native?code=<code>. This breaks the native oauth flows for clients that previously parsed the response from /oauth/authorize/<code>. This is what has kept us from upgrading doorkeeper. But now that we have to upgrade to 4.4.2 to get the backport for the implicit token revocation fix #1120, this has become a more pressing issue. It would be nice to have a initializer option that either lets us opt out of the breaking api change that exists in the minor version bump from v4.2.6 - v4.4.2 or add the option to customize this route. I would be happy to put in a PR for either option if they seem reasonable.

Expected behavior

In a minor version bump I would not expect a breaking api change, I would expect the authorization code response for a native auth code flow to be: /oauth/authorize/<code>.

Actual behavior

The response is oauth/authorize/native?code=<code>.

@nbulaj
Copy link
Member

nbulaj commented Sep 13, 2018

Hi @pakwfoley . Yes, you are absolutely right. This change was made to help applications that automatically authorizes (take a look at original PR). I think we need to revert this for 4.x release, but save it for 5.x with notice in upgrade guides and changelog.

@nbulaj nbulaj added the bug label Sep 13, 2018
@pakwfoley
Copy link
Author

@nbulaj Thank you for the quick response! The only concern I have for reverting would be for those applications who have already bumped past 4.2.6 and asked clients to move over to the new api. I know it’s not easy to ask clients to move to a new api, and it’s especially not easy to ask them to revert after changing. Would it be unreasonable to add an option to opt out of the api change in the 4.x release, and remove that option for 5.x?

@nbulaj
Copy link
Member

nbulaj commented Sep 13, 2018

@pakwfoley I think you are right. It would be great if you can send a PR with such an option

@nbulaj
Copy link
Member

nbulaj commented Sep 19, 2018

Released with 4.4.3 @pakwfoley

@nbulaj
Copy link
Member

nbulaj commented Sep 20, 2018

Hi @pakwfoley . Can we close this issue ?

@pakwfoley
Copy link
Author

Released with 4.4.3

@starsolutions
Copy link
Contributor

starsolutions commented Nov 3, 2022

Hi @nbulaj @pakwfoley ,

Our team has run into a similar issue with this change, where we accidentally had production clients using this API. We're working to mitigate this and have them move to non-native redirect URIs but unfortunately it will be a while till we get all users on to a new version of our application that uses the new redirect URIs. I was wondering if you'd be ok with continuing to have the flag to enable to old behavior in the 5.x chain, so that we can continue to update past 4.x.

If this would be ok, I've created a PR that merges the changes from the 4.x branch to the main branch. Thank you!

I raised a PR for this as well: #1597

nbulaj added a commit that referenced this issue Nov 20, 2022
…king-option

Add optional support to use the url path for the native authorization code flow. Ports forward [#1143] from 4.4.3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants