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

oauth2 ver. 1.x already be EOL #317

Closed
scivola opened this issue Jul 4, 2022 · 10 comments · Fixed by #323
Closed

oauth2 ver. 1.x already be EOL #317

scivola opened this issue Jul 4, 2022 · 10 comments · Fixed by #323

Comments

@scivola
Copy link

scivola commented Jul 4, 2022

No description provided.

@scivola scivola changed the title oauth2 already be EOL oauth2 ver. 1.x already be EOL Jul 4, 2022
@joshbuker
Copy link
Member

The plan is to deprecate the custom OAuth implementations entirely for Sorcery v1 (by moving to using OmniAuth).

@joshbuker joshbuker added the to be implemented in v1 This issue or pull request will be resolved in the v1 rework, but has not yet been completed. label Aug 26, 2022
@Gr8tDaNe
Copy link

Any info when we could hope for a release of v1?

@pboling
Copy link

pboling commented Sep 27, 2022

Maintainer of Oauth2 here.

Oauth2 v1.x will be EOL in April 2023! Upgrading to v2 isn't hard for most use cases. Can the version restriction be loosened, so people can test with v2 before the release of sorcery v1.0?

@joshbuker
Copy link
Member

@pboling What are the breaking changes? If it's not too much of an overhaul, I can patch Sorcery v0 in the meantime. Apologies if there's already documentation on this; I'm at a work conference and don't have time to dig super deep right now.

@pboling
Copy link

pboling commented Sep 28, 2022

@joshbuker

  • By default, keys are transformed to snake case.
    • Original keys will still work as previously, in most scenarios, thanks to snaky_hash gem.
    • However, this is a breaking change if you rely on response.parsed.to_h to retain the original case, and the original wasn't snake case, as the keys in the result will be snake case.
    • As of version 2.0.4 you can turn key transformation off with the snaky: false option.
  • By default, the :auth_scheme is now :basic_auth (instead of :request_body)
    • This was default behavior before version 1.3.0, and it should not have been changed.
    • Third-party strategies and gems may need to be updated if a provider was requiring client id/secret in the request body
    • Clients should set :auth_scheme explicitly.
  • Parsing errors are no longer rescued, and will bubble up.
  • Default value for option OAuth2::Client - :token_url - removed leading slash to work with relative paths by default ('oauth/token')
  • Default value for option OAuth2::Client - :authorize_url - removed leading slash to work with relative paths by default ('oauth/authorize')
  • Removed the ability to call .error from an OAuth2::Response object
  • Token is expired if expired_at time is now
  • Dropped support for Ruby 1.8, 1.9, 2.0, and 2.1

That looks like a lot, but I've not seen many reports of issues with upgrading, and I suspect most people don't have to change anything.

@joshbuker
Copy link
Member

I'll see if I can take a stab at this next week.

@joshbuker joshbuker removed the to be implemented in v1 This issue or pull request will be resolved in the v1 rework, but has not yet been completed. label Oct 4, 2022
@joshbuker
Copy link
Member

@scivola @Gr8tDaNe @pboling Sorcery v0.16.4 is released which includes the version bump to OAuth2 ~> 2.0

@pboling
Copy link

pboling commented Oct 7, 2022

@joshbuker So great!!! Thank you!

@pboling
Copy link

pboling commented Oct 7, 2022

@joshbuker ... I just noticed the OAuth 1 support relies on the oauth gem. I maintain that one as well :). I created a few release tracks so I could deprecate old Rubies. For Sorcery you should use:

spec.add_dependency "oauth", ">= 0.6.2"

This will allow people using Ruby 2.7+ to have the latest version 1.1.x, and people stuclk on Ruby 2.4 will get the latest 0.6.x series release (both are actively maintained).

There are a number of bug fixes in both, and I'm not aware of any breaking changes.

@joshbuker
Copy link
Member

joshbuker commented Oct 7, 2022

IIRC, ~> 0.5 will allow 0.6.x releases as well, but not a bad idea to bump it up to whatever the latest is regardless.

Edit: Oh, but yes this would prevent them from using 1.x. Good point.

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 a pull request may close this issue.

4 participants