oauth2
🔐 oauth2 - A Ruby wrapper for the OAuth 2.0 Authorization Framework, including OpenID Connect (OIDC)
Science Score: 44.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
✓CITATION.cff file
Found CITATION.cff file -
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
○DOI references
-
○Academic publication links
-
○Committers with academic emails
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (8.7%) to scientific vocabulary
Keywords
Keywords from Contributors
Repository
🔐 oauth2 - A Ruby wrapper for the OAuth 2.0 Authorization Framework, including OpenID Connect (OIDC)
Basic Info
- Host: GitHub
- Owner: ruby-oauth
- License: mit
- Language: Ruby
- Default Branch: main
- Homepage: https://oauth2.galtzo.com/
- Size: 2.36 MB
Statistics
- Stars: 2,134
- Watchers: 39
- Forks: 621
- Open Issues: 3
- Releases: 4
Topics
Metadata Files
README.md
🔐 OAuth 2.0 Authorization Framework
⭐️ including OAuth 2.1 draft spec & OpenID Connect (OIDC)
If ☝️ ci_badges.map(&:color).detect { it != "green"} let me know, as I may have missed the discord notification.
OTOH, if ci_badges.map(&:color).all? { it == "green"} 👇️ send money so I can do more of this. FLOSS maintenance is now my full-time job.
🌻 Synopsis
OAuth 2.0 is the industry-standard protocol for authorization. OAuth 2.0 focuses on client developer simplicity while providing specific authorization flows for web applications, desktop applications, mobile phones, and living room devices. This is a RubyGem for implementing OAuth 2.0 clients (not servers) in Ruby applications.
Quick Example
Convert the following `curl` command into a token request using this gem...
```shell curl --request POST \ --url 'https://login.microsoftonline.com/REDMOND_REDACTED/oauth2/token' \ --header 'content-type: application/x-www-form-urlencoded' \ --data grant_type=client_credentials \ --data client_id=REDMOND_CLIENT_ID \ --data client_secret=REDMOND_CLIENT_SECRET \ --data resource=REDMOND_RESOURCE_UUID ``` NOTE: In the ruby version below, certain params are passed to the `get_token` call, instead of the client creation. ```ruby OAuth2::Client.new( "REDMOND_CLIENT_ID", # client_id "REDMOND_CLIENT_SECRET", # client_secret auth_scheme: :request_body, # Other modes are supported: :basic_auth, :tls_client_auth, :private_key_jwt token_url: "oauth2/token", # relative path, except with leading `/`, then absolute path site: "https://login.microsoftonline.com/REDMOND_REDACTED", ). # The base path for token_url when it is relative client_credentials. # There are many other types to choose from! get_token(resource: "REDMOND_RESOURCE_UUID") ``` NOTE: `header` - The content type specified in the `curl` is already the default!If it seems like you are in the wrong place, you might try one of these:
- OAuth 2.0 Spec
- doorkeeper gem for OAuth 2.0 server/provider implementation.
- oauth sibling gem for OAuth 1.0a implementations in Ruby.
💡 Info you can shake a stick at
| Tokens to Remember |
|
|-------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| Works with JRuby |
|
| Works with Truffle Ruby |
|
| Works with MRI Ruby 3 |
|
| Works with MRI Ruby 2 |
|
| Source |
|
| Documentation |
|
| Compliance |
|
| Style |
|
| Support |
|
| Maintainer 🎖️ |
|
|
... 💖 |
🧊 🐙 🛖 🧪 |
Compatibility
- Operating Systems: Linux, MacOS, Windows
- MRI Ruby @ v2.3, v2.4, v2.5, v2.6, v2.7, v3.0, v3.1, v3.2, v3.3, v3.4, HEAD
- NOTE: This gem may still install and run on ruby v2.2, but vanilla GitHub Actions no longer supports testing against it, so YMMV. Accept patches so long as they don't break the platforms that do run in CI.
- JRuby @ v9.4, v10.0, HEAD
- NOTE: This gem may still install and run on JRuby v9.2 and v9.3, but they are EOL, builds are flaky, and GitHub Actions doesn't have a proper
allow-failuresfeature, and until they do flaky EOL-platform builds get dropped, so YMMV. Accept patches so long as they don't break the platforms that do run in CI.
- NOTE: This gem may still install and run on JRuby v9.2 and v9.3, but they are EOL, builds are flaky, and GitHub Actions doesn't have a proper
- TruffleRuby @ v23.1, v24.1, HEAD
- NOTE: This gem may still install and run on Truffleruby v22.3 and v23.0, but they are EOL, builds are flaky, and GitHub Actions doesn't have a proper
allow-failuresfeature, and until they do flaky EOL-platform builds get dropped, so YMMV. Accept patches so long as they don't break the platforms that do run in CI.
- NOTE: This gem may still install and run on Truffleruby v22.3 and v23.0, but they are EOL, builds are flaky, and GitHub Actions doesn't have a proper
- gem
faraday@ v0, v1, v2, HEAD ⏩️ lostisland/faraday - gem
jwt@ v1, v2, v3, HEAD ⏩️ jwt/ruby-jwt - gem
logger@ v1.2, v1.5, v1.7, HEAD ⏩️ ruby/logger - gem
multi_xml@ v0.5, v0.6, v0.7, HEAD ⏩️ sferik/multi_xml - gem
rack@ v1.2, v1.6, v2, v3, HEAD ⏩️ rack/rack - gem
snaky_hash@ v2, HEAD ⏩️ ruby-oauth/snaky_hash - gem
version_gem@ v1, HEAD ⏩️ ruby-oauth/version_gem
The last two were extracted from this gem. They are part of the ruby-oauth org,
and are developed in tight collaboration with this gem.
Also, where reasonable, tested against the runtime dependencies of those dependencies:
- gem
hashie@ v0, v1, v2, v3, v4, v5, HEAD ⏩️ hashie/hashie
Upgrading Runtime Gem Dependencies
This project sits underneath a large portion of the authorization systems on the internet. According to GitHub's project tracking, which I believe only reports on public projects, 100,000+ projects, and 500+ packages depend on this project.
That means it is painful for the Ruby community when this gem forces updates to its runtime dependencies.
As a result, great care, and a lot of time, have been invested to ensure this gem is working with all the leading versions per each minor version of Ruby of all the runtime dependencies it can install with.
What does that mean specifically for the runtime dependencies?
We have 100% test coverage of lines and branches, and this test suite runs across a large matrix covering the latest patch for each of the following minor versions:
| 🚚 Amazing test matrix was brought to you by | 🔎 appraisal2 🔎 | |------------------------------------------------|--------------------------------------------------------------------------------------| | 👟 Check it out! | ✨ github.com/appraisal-rb/appraisal2 ✨ |
You should upgrade this gem with confidence*.
- This gem follows a strict & correct (according to the maintainer of SemVer; more info) interpretation of SemVer.
- Dropping support for any of the runtime dependency versions above will be a major version bump.
- If you aren't on one of the minor versions above, make getting there a priority.
- You should upgrade the dependencies of this gem with confidence*.
- Please do upgrade, and then, when it goes smooth as butter please sponsor me. Thanks!
* MIT license; The only guarantees I make are for enterprise support.
Standard Library Dependencies
The various versions of each are tested via the Ruby test matrix, along with whatever Ruby includes them. * base64 * cgi * json * time * logger (removed from stdlib in Ruby 3.5 so added as runtime dependency in v2.0.10) If you use a gem version of a core Ruby library it should work fine!Federated DVCS
Find this repo on other forges (Coming soon!)
| Federated [DVCS][💎d-in-dvcs] Repository | Status | Issues | PRs | Wiki | CI | Discussions | |-----------------------------------------------|-----------------------------------------------------------------------|---------------------------|--------------------------|---------------------------|--------------------------|------------------------------| | 🧪 [ruby-oauth/oauth2 on GitLab][📜src-gl] | The Truth | [💚][🤝gl-issues] | [💚][🤝gl-pulls] | [💚][📜wiki] | 🏀 Tiny Matrix | ➖ | | 🧊 [ruby-oauth/oauth2 on CodeBerg][📜src-cb] | An Ethical Mirror ([Donate][🤝cb-donate]) | [💚][🤝cb-issues] | [💚][🤝cb-pulls] | ➖ | ⭕️ No Matrix | ➖ | | 🐙 [ruby-oauth/oauth2 on GitHub][📜src-gh] | Another Mirror | [💚][🤝gh-issues] | [💚][🤝gh-pulls] | ➖ | 💯 Full Matrix | [💚][gh-discussions] | | 🤼 [OAuth Ruby Google Group][⛳gg-discussions] | "Active" | ➖ | ➖ | ➖ | ➖ | [💚][⛳gg-discussions] | | 🎮️ [Discord Server][✉️discord-invite] | [![Live Chat on Discord][✉️discord-invite-img-ftb]][✉️discord-invite] | [Let's][✉️discord-invite] | [talk][✉️discord-invite] | [about][✉️discord-invite] | [this][✉️discord-invite] | [library!][✉️discord-invite] |Enterprise Support 
Available as part of the Tidelift Subscription.
Need enterprise-level guarantees?
The maintainers of this and thousands of other packages are working with Tidelift to deliver commercial support and maintenance for the open source packages you use to build your applications. Save time, reduce risk, and improve code health, while paying the maintainers of the exact packages you use. [![Get help from me on Tidelift][🏙️entsup-tidelift-img]][🏙️entsup-tidelift] - 💡Subscribe for support guarantees covering _all_ your FLOSS dependencies - 💡Tidelift is part of [Sonar][🏙️entsup-tidelift-sonar] - 💡Tidelift pays maintainers to maintain the software you depend on!📊`@`Pointy Haired Boss: An [enterprise support][🏙️entsup-tidelift] subscription is "[never gonna let you down][🧮kloc]", and *supports* open source maintainers Alternatively: - [![Live Chat on Discord][✉️discord-invite-img-ftb]][✉️discord-invite] - [![Get help from me on Upwork][👨🏼🏫expsup-upwork-img]][👨🏼🏫expsup-upwork] - [![Get help from me on Codementor][👨🏼🏫expsup-codementor-img]][👨🏼🏫expsup-codementor]
🚀 Release Documentation
Version 2.0.x
2.0.x CHANGELOG and README
| Version | Release Date | CHANGELOG | README | |---------|--------------|---------------------------------------|---------------------------------| | 2.0.13 | 2025-08-30 | [v2.0.13 CHANGELOG][2.0.13-changelog] | [v2.0.13 README][2.0.13-readme] | | 2.0.12 | 2025-05-31 | [v2.0.12 CHANGELOG][2.0.12-changelog] | [v2.0.12 README][2.0.12-readme] | | 2.0.11 | 2025-05-23 | [v2.0.11 CHANGELOG][2.0.11-changelog] | [v2.0.11 README][2.0.11-readme] | | 2.0.10 | 2025-05-17 | [v2.0.10 CHANGELOG][2.0.10-changelog] | [v2.0.10 README][2.0.10-readme] | | 2.0.9 | 2022-09-16 | [v2.0.9 CHANGELOG][2.0.9-changelog] | [v2.0.9 README][2.0.9-readme] | | 2.0.8 | 2022-09-01 | [v2.0.8 CHANGELOG][2.0.8-changelog] | [v2.0.8 README][2.0.8-readme] | | 2.0.7 | 2022-08-22 | [v2.0.7 CHANGELOG][2.0.7-changelog] | [v2.0.7 README][2.0.7-readme] | | 2.0.6 | 2022-07-13 | [v2.0.6 CHANGELOG][2.0.6-changelog] | [v2.0.6 README][2.0.6-readme] | | 2.0.5 | 2022-07-07 | [v2.0.5 CHANGELOG][2.0.5-changelog] | [v2.0.5 README][2.0.5-readme] | | 2.0.4 | 2022-07-01 | [v2.0.4 CHANGELOG][2.0.4-changelog] | [v2.0.4 README][2.0.4-readme] | | 2.0.3 | 2022-06-28 | [v2.0.3 CHANGELOG][2.0.3-changelog] | [v2.0.3 README][2.0.3-readme] | | 2.0.2 | 2022-06-24 | [v2.0.2 CHANGELOG][2.0.2-changelog] | [v2.0.2 README][2.0.2-readme] | | 2.0.1 | 2022-06-22 | [v2.0.1 CHANGELOG][2.0.1-changelog] | [v2.0.1 README][2.0.1-readme] | | 2.0.0 | 2022-06-21 | [v2.0.0 CHANGELOG][2.0.0-changelog] | [v2.0.0 README][2.0.0-readme] |Older Releases
1.4.x CHANGELOGs and READMEs
| Version | Release Date | CHANGELOG | README | |---------|--------------|---------------------------------------|---------------------------------| | 1.4.11 | Sep 16, 2022 | [v1.4.11 CHANGELOG][1.4.11-changelog] | [v1.4.11 README][1.4.11-readme] | | 1.4.10 | Jul 1, 2022 | [v1.4.10 CHANGELOG][1.4.10-changelog] | [v1.4.10 README][1.4.10-readme] | | 1.4.9 | Feb 20, 2022 | [v1.4.9 CHANGELOG][1.4.9-changelog] | [v1.4.9 README][1.4.9-readme] | | 1.4.8 | Feb 18, 2022 | [v1.4.8 CHANGELOG][1.4.8-changelog] | [v1.4.8 README][1.4.8-readme] | | 1.4.7 | Mar 19, 2021 | [v1.4.7 CHANGELOG][1.4.7-changelog] | [v1.4.7 README][1.4.7-readme] | | 1.4.6 | Mar 19, 2021 | [v1.4.6 CHANGELOG][1.4.6-changelog] | [v1.4.6 README][1.4.6-readme] | | 1.4.5 | Mar 18, 2021 | [v1.4.5 CHANGELOG][1.4.5-changelog] | [v1.4.5 README][1.4.5-readme] | | 1.4.4 | Feb 12, 2020 | [v1.4.4 CHANGELOG][1.4.4-changelog] | [v1.4.4 README][1.4.4-readme] | | 1.4.3 | Jan 29, 2020 | [v1.4.3 CHANGELOG][1.4.3-changelog] | [v1.4.3 README][1.4.3-readme] | | 1.4.2 | Oct 1, 2019 | [v1.4.2 CHANGELOG][1.4.2-changelog] | [v1.4.2 README][1.4.2-readme] | | 1.4.1 | Oct 13, 2018 | [v1.4.1 CHANGELOG][1.4.1-changelog] | [v1.4.1 README][1.4.1-readme] | | 1.4.0 | Jun 9, 2017 | [v1.4.0 CHANGELOG][1.4.0-changelog] | [v1.4.0 README][1.4.0-readme] |1.3.x Readmes
| Version | Release Date | Readme | |---------|--------------|--------------------------------------------------------------| | 1.3.1 | Mar 3, 2017 | https://gitlab.com/ruby-oauth/oauth2/-/blob/v1.3.1/README.md | | 1.3.0 | Dec 27, 2016 | https://gitlab.com/ruby-oauth/oauth2/-/blob/v1.3.0/README.md |≤= 1.2.x Readmes (2016 and before)
| Version | Release Date | Readme | |---------|--------------|--------------------------------------------------------------| | 1.2.0 | Jun 30, 2016 | https://gitlab.com/ruby-oauth/oauth2/-/blob/v1.2.0/README.md | | 1.1.0 | Jan 30, 2016 | https://gitlab.com/ruby-oauth/oauth2/-/blob/v1.1.0/README.md | | 1.0.0 | May 23, 2014 | https://gitlab.com/ruby-oauth/oauth2/-/blob/v1.0.0/README.md | | < 1.0.0 | Find here | https://gitlab.com/ruby-oauth/oauth2/-/tags |✨ Installation
Install the gem and add to the application's Gemfile by executing:
console
bundle add oauth2
If bundler is not being used to manage dependencies, install the gem by executing:
console
gem install oauth2
🔒 Secure Installation
For Medium or High Security Installations
This gem is cryptographically signed, and has verifiable [SHA-256 and SHA-512][💎SHA_checksums] checksums by [stone_checksums][💎stone_checksums]. Be sure the gem you install hasn’t been tampered with by following the instructions below. Add my public key (if you haven’t already, expires 2045-04-29) as a trusted certificate: ```console gem cert --add <(curl -Ls https://raw.github.com/galtzo-floss/certs/main/pboling.pem) ``` You only need to do that once. Then proceed to install with: ```console gem install oauth2 -P MediumSecurity ``` The `MediumSecurity` trust profile will verify signed gems, but allow the installation of unsigned dependencies. This is necessary because not all of `oauth2`’s dependencies are signed, so we cannot use `HighSecurity`. If you want to up your security game full-time: ```console bundle config set --global trust-policy MediumSecurity ``` NOTE: Be prepared to track down certs for signed gems and add them the same way you added mine.What is new for v2.0?
- Works with Ruby versions >= 2.2
- Drop support for the expired MAC Draft (all versions)
- Support IETF rfc7515 JSON Web Signature - JWS (since v2.0.12)
- Support JWT
kidfor key discovery and management
- Support JWT
- Support IETF rfc7523 JWT Bearer Tokens (since v2.0.0)
- Support IETF rfc7231 Relative Location in Redirect (since v2.0.0)
- Support IETF rfc6749 Don't set oauth params when nil (since v2.0.0)
- Support IETF rfc7009 Token Revocation (since v2.0.10, updated in v2.0.13 to support revocation via URL-encoded parameters)
- Support OIDC 1.0 Private Key JWT; based on the OAuth JWT assertion specification (RFC 7523)
- Support new formats, including from jsonapi.org:
application/vdn.api+json,application/vnd.collection+json,application/hal+json,application/problem+json - Adds option to
OAuth2::Client#get_token::access_token_class(AccessToken); user specified class to use for all calls toget_token
- Adds option to
OAuth2::AccessToken#initialize::expires_latency(nil); number of seconds by which AccessToken validity will be reduced to offset latency
- 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_hto 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: falseoption.
- By default, the
:auth_schemeis now:basic_auth(instead of:request_body)- Third-party strategies and gems may need to be updated if a provider was requiring client id/secret in the request body
- ... A lot more
Compatibility
Targeted ruby compatibility is non-EOL versions of Ruby, currently 3.2, 3.3, and 3.4.
Compatibility is further distinguished as "Best Effort Support" or "Incidental Support" for older versions of Ruby.
This gem will install on Ruby versions >= v2.2 for 2.x releases.
See 1-4-stable branch for older rubies.
Ruby Engine Compatibility Policy
This gem is tested against MRI, JRuby, and Truffleruby. Each of those has varying versions that target a specific version of MRI Ruby. This gem should work in the just-listed Ruby engines according to the targeted MRI compatibility in the table below. If you would like to add support for additional engines, see [gemfiles/README.md](gemfiles/README.md), then submit a PR to the correct maintenance branch as according to the table below.Ruby Version Compatibility Policy
If something doesn't work on one of these interpreters, it's a bug. This library may inadvertently work (or seem to work) on other Ruby implementations, however support will only be provided for the versions listed above. If you would like this library to support another Ruby version, you may volunteer to be a maintainer. Being a maintainer entails making sure all tests run and pass on that implementation. When something breaks on your implementation, you will be responsible for providing patches in a timely fashion. If critical issues for a particular implementation exist at the time of a major release, support for that Ruby version may be dropped.| | Ruby OAuth2 Version | Maintenance Branch | Targeted Support | Best Effort Support | Incidental Support |
|:----|---------------------|--------------------|----------------------|-------------------------|------------------------------|
| 1️⃣ | 2.0.x | main | 3.2, 3.3, 3.4 | 2.5, 2.6, 2.7, 3.0, 3.1 | 2.2, 2.3, 2.4 |
| 2️⃣ | 1.4.x | 1-4-stable | 3.2, 3.3, 3.4 | 2.5, 2.6, 2.7, 3.0, 3.1 | 1.9, 2.0, 2.1, 2.2, 2.3, 2.4 |
| 3️⃣ | older | N/A | Best of luck to you! | Please upgrade! | |
NOTE: The 1.4 series will only receive critical security updates. See SECURITY.md.
⚙️ Configuration
You can turn on additional warnings.
ruby
OAuth2.configure do |config|
# Turn on a warning like:
# OAuth2::AccessToken.from_hash: `hash` contained more than one 'token' key
config.silence_extra_tokens_warning = false # default: true
# Set to true if you want to also show warnings about no tokens
config.silence_no_tokens_warning = false # default: true,
end
The "extra tokens" problem comes from ambiguity in the spec about which token is the right token.
Some OAuth 2.0 standards legitimately have multiple tokens.
You may need to subclass OAuth2::AccessToken, or write your own custom alternative to it, and pass it in.
Specify your custom class with the access_token_class option.
If you only need one token you can, as of v2.0.10,
specify the exact token name you want to extract via the OAuth2::AccessToken using
the token_name option.
You'll likely need to do some source diving. This gem has 100% test coverage for lines and branches, so the specs are a great place to look for ideas. If you have time and energy please contribute to the documentation!
🔧 Basic Usage
authorize_url and token_url are on site root (Just Works!)
```ruby require "oauth2" client = OAuth2::Client.new("clientid", "clientsecret", site: "https://example.org")
=> #<OAuth2::Client:0x00000001204c8288 @id="clientid", @secret="clientsec...
client.authcode.authorizeurl(redirect_uri: "http://localhost:8080/oauth2/callback")
=> "https://example.org/oauth/authorize?clientid=clientid&redirecturi=http%3A%2F%2Flocalhost%3A8080%2Foauth2%2Fcallback&responsetype=code"
access = client.authcode.gettoken("authorizationcodevalue", redirecturi: "http://localhost:8080/oauth2/callback", headers: {"Authorization" => "Basic somepassword"}) response = access.get("/api/resource", params: {"query_foo" => "bar"}) response.class.name
=> OAuth2::Response
```
Relative authorize_url and token_url (Not on site root, Just Works!)
In above example, the default Authorization URL is oauth/authorize and default Access Token URL is oauth/token, and, as they are missing a leading /, both are relative.
```ruby client = OAuth2::Client.new("clientid", "clientsecret", site: "https://example.org/nested/directory/on/your/server")
=> #<OAuth2::Client:0x00000001204c8288 @id="clientid", @secret="clientsec...
client.authcode.authorizeurl(redirect_uri: "http://localhost:8080/oauth2/callback")
=> "https://example.org/nested/directory/on/your/server/oauth/authorize?clientid=clientid&redirecturi=http%3A%2F%2Flocalhost%3A8080%2Foauth2%2Fcallback&responsetype=code"
```
Customize authorize_url and token_url
You can specify custom URLs for authorization and access token, and when using a leading / they will not be relative, as shown below:
```ruby client = OAuth2::Client.new( "clientid", "clientsecret", site: "https://example.org/nested/directory/on/your/server", authorizeurl: "/jaunty/authorize/", tokenurl: "/stirrups/access_token", )
=> #<OAuth2::Client:0x00000001204c8288 @id="clientid", @secret="clientsec...
client.authcode.authorizeurl(redirect_uri: "http://localhost:8080/oauth2/callback")
=> "https://example.org/jaunty/authorize/?clientid=clientid&redirecturi=http%3A%2F%2Flocalhost%3A8080%2Foauth2%2Fcallback&responsetype=code"
client.class.name
=> OAuth2::Client
```
snake_case and indifferent access in Response#parsed
```ruby response = access.get("/api/resource", params: {"query_foo" => "bar"})
Even if the actual response is CamelCase. it will be made available as snaky:
JSON.parse(response.body) # => {"accessToken"=>"aaaaaaaa", "additionalData"=>"additional"} response.parsed # => {"accesstoken"=>"aaaaaaaa", "additionaldata"=>"additional"} response.parsed.accesstoken # => "aaaaaaaa" response.parsed[:accesstoken] # => "aaaaaaaa" response.parsed.additionaldata # => "additional" response.parsed[:additionaldata] # => "additional" response.parsed.class.name # => SnakyHash::StringKeyed (from snaky_hash gem) ```
Serialization
As of v2.0.11, if you need to serialize the parsed result, you can!
There are two ways to do this, globally, or discretely. The discrete way is recommended.
Global Serialization Config
Globally configure SnakyHash::StringKeyed to use the serializer. Put this in your code somewhere reasonable (like an initializer for Rails).
ruby
SnakyHash::StringKeyed.class_eval do
extend SnakyHash::Serializer
end
Discrete Serialization Config
Discretely configure a custom Snaky Hash class to use the serializer.
``ruby
class MySnakyHash < SnakyHash::StringKeyed
# Give this hash classdumpandload` abilities!
extend SnakyHash::Serializer
end
And tell your client to use the custom class in each call:
client = OAuth2::Client.new("clientid", "clientsecret", site: "https://example.org/oauth2") token = client.gettoken({snakyhash_klass: MySnakyHash}) ```
Serialization Extensions
These extensions work regardless of whether you used the global or discrete config above.
There are a few hacks you may need in your class to support Ruby < 2.4.2 or < 2.6. They are likely not needed if you are on a newer Ruby. See response_spec.rb if you need to study the hacks for older Rubies.
``ruby
class MySnakyHash < SnakyHash::StringKeyed
# Give this hash classdumpandload` abilities!
extend SnakyHash::Serializer
#### Serialization Extentions # # Act on the non-hash values (including the values of hashes) as they are dumped to JSON # In other words, this retains nested hashes, and only the deepest leaf nodes become bananas. # WARNING: This is a silly example! dumpvalueextensions.add(:to_fruit) do |value| "banana" # => Make values "banana" on dump end
# Act on the non-hash values (including the values of hashes) as they are loaded from the JSON dump # In other words, this retains nested hashes, and only the deepest leaf nodes become . # WARNING: This is a silly example! loadvalueextensions.add(:to_stars) do |value| "" # Turn dumped bananas into *** when they are loaded end
# Act on the entire hash as it is prepared for dumping to JSON # WARNING: This is a silly example! dumphashextensions.add(:tocheese) do |value| if value.isa?(Hash) value.transformkeys do |key| split = key.split("") firstword = split[0] key.sub(firstword, "cheese") end else value end end
# Act on the entire hash as it is loaded from the JSON dump # WARNING: This is a silly example! loadhashextensions.add(:topizza) do |value| if value.isa?(Hash) res = klass.new value.keys.eachwithobject(res) do |key, result| split = key.split("") lastword = split[-1] newkey = key.sub(lastword, "pizza") result[new_key] = value[key] end res else value end end end ```
See response_spec.rb, or the ruby-oauth/snaky_hash gem for more ideas.
Prefer camelCase over snake_case? => snaky: false
ruby
response = access.get("/api/resource", params: {"query_foo" => "bar"}, snaky: false)
JSON.parse(response.body) # => {"accessToken"=>"aaaaaaaa", "additionalData"=>"additional"}
response.parsed # => {"accessToken"=>"aaaaaaaa", "additionalData"=>"additional"}
response.parsed["accessToken"] # => "aaaaaaaa"
response.parsed["additionalData"] # => "additional"
response.parsed.class.name # => Hash (just, regular old Hash)
Debugging & Logging
Set an environment variable as per usual (e.g. with [dotenv](https://github.com/bkeepers/dotenv)). ```ruby # will log both request and response, including bodies ENV["OAUTH_DEBUG"] = "true" ``` By default, debug output will go to `$stdout`. This can be overridden when initializing your OAuth2::Client. ```ruby require "oauth2" client = OAuth2::Client.new( "client_id", "client_secret", site: "https://example.org", logger: Logger.new("example.log", "weekly"), ) ```OAuth2::Response
The AccessToken methods #get, #post, #put and #delete and the generic #request
will return an instance of the #OAuth2::Response class.
This instance contains a #parsed method that will parse the response body and
return a Hash-like SnakyHash::StringKeyed if the Content-Type is application/x-www-form-urlencoded or if
the body is a JSON object. It will return an Array if the body is a JSON
array. Otherwise, it will return the original body string.
The original response body, headers, and status can be accessed via their respective methods.
OAuth2::AccessToken
If you have an existing Access Token for a user, you can initialize an instance
using various class methods including the standard new, from_hash (if you have
a hash of the values), or from_kvform (if you have an
application/x-www-form-urlencoded encoded string of the values).
OAuth2::Error
On 400+ status code responses, an OAuth2::Error will be raised. If it is a
standard OAuth2 error response, the body will be parsed and #code and #description will contain the values provided from the error and
error_description parameters. The #response property of OAuth2::Error will
always contain the OAuth2::Response instance.
If you do not want an error to be raised, you may use :raise_errors => false
option on initialization of the client. In this case the OAuth2::Response
instance will be returned as usual and on 400+ status code responses, the
Response instance will contain the OAuth2::Error instance.
Authorization Grants
Note on OAuth 2.1 (draft): - PKCE is required for all OAuth clients using the authorization code flow (especially public clients). Implement PKCE in your app when required by your provider. See RFC 7636 and RFC 8252. - Redirect URIs must be compared using exact string matching by the Authorization Server. - The Implicit grant (response_type=token) and the Resource Owner Password Credentials grant are omitted from OAuth 2.1; they remain here for OAuth 2.0 compatibility but should be avoided for new apps. - Bearer tokens in the query string are omitted due to security risks; prefer Authorization header usage. - Refresh tokens for public clients must either be sender-constrained (e.g., DPoP/MTLS) or one-time use. - The definitions of public and confidential clients are simplified to refer only to whether the client has credentials.
References: - OAuth 2.1 draft: https://datatracker.ietf.org/doc/html/draft-ietf-oauth-v2-1-13 - Aaron Parecki: https://aaronparecki.com/2019/12/12/21/its-time-for-oauth-2-dot-1 - FusionAuth: https://fusionauth.io/blog/2020/04/15/whats-new-in-oauth-2-1 - Okta: https://developer.okta.com/blog/2019/12/13/oauth-2-1-how-many-rfcs - Video: https://www.youtube.com/watch?v=g_aVPdwBTfw - Differences overview: https://fusionauth.io/learn/expert-advice/oauth/differences-between-oauth-2-oauth-2-1/
Currently, the Authorization Code, Implicit, Resource Owner Password Credentials, Client Credentials, and Assertion
authentication grant types have helper strategy classes that simplify client
use. They are available via the #auth_code,
#implicit,
#password,
#client_credentials, and
#assertion methods respectively.
These aren't full examples, but demonstrative of the differences between usage for each strategy. ```ruby authurl = client.authcode.authorizeurl(redirecturi: "http://localhost:8080/oauth/callback") access = client.authcode.gettoken("codevalue", redirecturi: "http://localhost:8080/oauth/callback")
authurl = client.implicit.authorizeurl(redirect_uri: "http://localhost:8080/oauth/callback")
get the token params in the callback and
access = OAuth2::AccessToken.fromkvform(client, querystring)
access = client.password.get_token("username", "password")
access = client.clientcredentials.gettoken
Client Assertion Strategy
see: https://tools.ietf.org/html/rfc7523
claimset = { iss: "http://localhost:3001", aud: "http://localhost:8080/oauth2/token", sub: "me@example.com", exp: Time.now.utc.toi + 3600, } assertionparams = [claimset, "HS256", "secretkey"] access = client.assertion.gettoken(assertion_params)
The access (i.e. access token) is then used like so:
access.token # actual access_token string, if you need it somewhere access.get("/api/stuff") # making api calls with access token ```
If you want to specify additional headers to be sent out with the request, add a 'headers' hash under 'params':
ruby
access = client.auth_code.get_token("code_value", redirect_uri: "http://localhost:8080/oauth/callback", headers: {"Some" => "Header"})
You can always use the #request method on the OAuth2::Client instance to make
requests for tokens for any Authentication grant type.
📘 Comprehensive Usage
Common Flows (end-to-end)
- Authorization Code (server-side web app):
```ruby require "oauth2" client = OAuth2::Client.new( ENV["CLIENTID"], ENV["CLIENTSECRET"], site: "https://provider.example.com", redirect_uri: "https://my.app.example.com/oauth/callback", )
Step 1: redirect user to consent
state = SecureRandom.hex(16) authurl = client.authcode.authorize_url(scope: "openid profile email", state: state)
redirectto authurl
Step 2: handle the callback
params[:code], params[:state]
raise "state mismatch" unless params[:state] == state access = client.authcode.gettoken(params[:code])
Step 3: call APIs
profile = access.get("/api/v1/me").parsed ```
- Client Credentials (machine-to-machine):
ruby
client = OAuth2::Client.new(ENV["CLIENT_ID"], ENV["CLIENT_SECRET"], site: "https://provider.example.com")
access = client.client_credentials.get_token(audience: "https://api.example.com")
resp = access.get("/v1/things")
- Resource Owner Password (legacy; avoid when possible):
ruby
access = client.password.get_token("jdoe", "s3cret", scope: "read")
Examples
JHipster UAA (Spring Cloud) password grant example (legacy; avoid when possible)
```ruby # This converts a Postman/Net::HTTP multipart token request to oauth2 gem usage. # JHipster UAA typically exposes the token endpoint at /uaa/oauth/token. # The original snippet included: # - Basic Authorization header for the client (web_app:changeit) # - X-XSRF-TOKEN header from a cookie (some deployments require it) # - grant_type=password with username/password and client_id # Using oauth2 gem, you don't need to build multipart bodies; the gem sends # application/x-www-form-urlencoded as required by RFC 6749. require "oauth2" client = OAuth2::Client.new( "web_app", # client_id "changeit", # client_secret site: "http://localhost:8080/uaa", token_url: "/oauth/token", # absolute under site (or "oauth/token" relative) auth_scheme: :basic_auth, # sends HTTP Basic Authorization header ) # If your UAA requires an XSRF header for the token call, provide it as a header. # Often this is not required for token endpoints, but if your gateway enforces it, # obtain the value from the XSRF-TOKEN cookie and pass it here. xsrf_token = ENV["X_XSRF_TOKEN"] # e.g., pulled from a prior set-cookie value access = client.password.get_token( "admin", # username "admin", # password headers: xsrf_token ? {"X-XSRF-TOKEN" => xsrf_token} : {}, # JHipster commonly also accepts/needs the client_id in the body; include if required: # client_id: "web_app", ) puts access.token puts access.to_hash # full token response ``` Notes: - Resource Owner Password Credentials (ROPC) is deprecated in OAuth 2.1 and discouraged. Prefer Authorization Code + PKCE. - If your deployment strictly demands the X-XSRF-TOKEN header, first fetch it from an endpoint that sets the XSRF-TOKEN cookie (often "/" or a login page) and pass it to headers. - For Basic auth, auth_scheme: :basic_auth handles the Authorization header; you do not need to base64-encode manually.Refresh Tokens
When the server issues a refresh_token, you can refresh manually or implement an auto-refresh wrapper.
- Manual refresh:
ruby
if access.expired?
access = access.refresh
end
- Auto-refresh wrapper pattern:
```ruby class AutoRefreshingToken def initialize(tokenprovider, store: nil) @token = tokenprovider @store = store # e.g., something that responds to read/write for token data end
def with(&blk) tok = ensurefresh! blk ? blk.call(tok) : tok rescue OAuth2::Error => e # If a 401 suggests token invalidation, try one refresh and retry once if e.response && e.response.status == 401 && @token.refreshtoken @token = @token.refresh @store.write(@token.to_hash) if @store retry end raise end
private
def ensurefresh! if @token.expired? && @token.refreshtoken @token = @token.refresh @store.write(@token.to_hash) if @store end @token end end
usage
keeper = AutoRefreshingToken.new(access) keeper.with { |tok| tok.get("/v1/protected") } ```
Persist the token across processes using AccessToken#to_hash and AccessToken.from_hash(client, hash).
Token Revocation (RFC 7009)
You can revoke either the access token or the refresh token.
```ruby
Revoke the current access token
access.revoke(tokentypehint: :access_token)
Or explicitly revoke the refresh token (often also invalidates associated access tokens)
access.revoke(tokentypehint: :refresh_token) ```
Client Configuration Tips
Mutual TLS (mTLS) client authentication
Some providers require OAuth requests (including the token request and subsequent API calls) to be sender‑constrained using mutual TLS (mTLS). With this gem, you enable mTLS by providing a client certificate/private key to Faraday via connectionopts.ssl and, if your provider requires it for client authentication, selecting the tlsclientauth authscheme.
Example using PEM files (certificate and key):
```ruby require "oauth2" require "openssl"
client = OAuth2::Client.new( ENV.fetch("CLIENTID"), ENV.fetch("CLIENTSECRET"), site: "https://example.com", authorizeurl: "/oauth/authorize/", tokenurl: "/oauth/token/", authscheme: :tlsclientauth, # if your AS requires mTLS-based client authentication connectionopts: { ssl: { clientcert: OpenSSL::X509::Certificate.new(File.read("localhost.pem")), clientkey: OpenSSL::PKey::RSA.new(File.read("localhost-key.pem")), # Optional extras, uncomment as needed: # ca_file: "/path/to/ca-bundle.pem", # custom CA(s) # verify: true # enable server cert verification (recommended) }, }, )
Example token request (any grant type can be used). The mTLS handshake
will occur automatically on HTTPS calls using the configured cert/key.
access = client.clientcredentials.gettoken
Subsequent resource requests will also use mTLS on HTTPS endpoints of site:
resp = access.get("/v1/protected") ```
Notes: - Files must contain the appropriate PEMs. The private key may be encrypted; if so, pass a password to OpenSSL::PKey::RSA.new(File.read(path), ENV["KEYPASSWORD"]). - If your certificate and key are in a PKCS#12/PFX bundle, you can load them like: - p12 = OpenSSL::PKCS12.new(File.read("client.p12"), ENV["P12PASSWORD"]) - clientcert = p12.certificate; clientkey = p12.key - Server trust: - If your environment does not have system CAs, specify cafile or capath inside the ssl: hash. - Keep verify: true in production. Set verify: false only for local testing. - Faraday adapter: Any adapter that supports Ruby’s OpenSSL should work. nethttp (default) and nethttppersistent are common choices. - Scope of mTLS: The SSL client cert is applied to any HTTPS request made by this client (token and resource requests) to the configured site base URL (and absolute URLs you call with the same client). - OIDC tie-in: Some OPs require tlsclientauth at the token endpoint per OIDC/OAuth specifications. That is enabled via authscheme: :tlsclientauth as shown above.
Authentication schemes for the token request
ruby
OAuth2::Client.new(
id,
secret,
site: "https://provider.example.com",
auth_scheme: :basic_auth, # default. Alternatives: :request_body, :tls_client_auth, :private_key_jwt
)
Faraday connection, timeouts, proxy, custom adapter/middleware:
ruby
client = OAuth2::Client.new(
id,
secret,
site: "https://provider.example.com",
connection_opts: {
request: {open_timeout: 5, timeout: 15},
proxy: ENV["HTTPS_PROXY"],
ssl: {verify: true},
},
) do |faraday|
faraday.request(:url_encoded)
# faraday.response :logger, Logger.new($stdout) # see OAUTH_DEBUG below
faraday.adapter(:net_http_persistent) # or any Faraday adapter you need
end
Using flat query params (Faraday::FlatParamsEncoder)
Some APIs expect repeated key parameters to be sent as flat params rather than arrays. Faraday provides FlatParamsEncoder for this purpose. You can configure the oauth2 client to use it when building requests.
```ruby require "faraday"
client = OAuth2::Client.new( id, secret, site: "https://api.example.com", # Pass Faraday connection options to make FlatParamsEncoder the default connectionopts: { request: {paramsencoder: Faraday::FlatParamsEncoder}, }, ) do |faraday| faraday.request(:urlencoded) faraday.adapter(:nethttp) end
access = client.clientcredentials.gettoken
Example of a GET with two flat filter params (not an array):
Results in: ?filter=order.clientCreatedTime%3E1445006997000&filter=order.clientCreatedTime%3C1445611797000
resp = access.get( "/v1/orders", params: { # Provide the values as an array; FlatParamsEncoder expands them as repeated keys filter: [ "order.clientCreatedTime>1445006997000", "order.clientCreatedTime<1445611797000", ], }, ) ```
If you instead need to build a raw Faraday connection yourself, the equivalent configuration is:
ruby
conn = Faraday.new("https://api.example.com", request: {params_encoder: Faraday::FlatParamsEncoder})
Redirection
The library follows up to max_redirects (default 5).
You can override per-client via options[:max_redirects].
Handling Responses and Errors
- Parsing:
ruby
resp = access.get("/v1/thing")
resp.status # Integer
resp.headers # Hash
resp.body # String
resp.parsed # SnakyHash::StringKeyed or Array when JSON array
- Error handling:
ruby
begin
access.get("/v1/forbidden")
rescue OAuth2::Error => e
e.code # OAuth2 error code (when present)
e.description # OAuth2 error description (when present)
e.response # OAuth2::Response (full access to status/headers/body)
end
- Disable raising on 4xx/5xx to inspect the response yourself:
ruby
client = OAuth2::Client.new(id, secret, site: site, raise_errors: false)
res = client.request(:get, "/v1/maybe-errors")
if res.status == 429
sleep res.headers["retry-after"].to_i
end
Making Raw Token Requests
If a provider requires non-standard parameters or headers, you can call client.get_token directly:
ruby
access = client.get_token({
grant_type: "client_credentials",
audience: "https://api.example.com",
headers: {"X-Custom" => "value"},
parse: :json, # override parsing
})
OpenID Connect (OIDC) Notes
- If the token response includes an
id_token(a JWT), this gem surfaces it but does not validate the signature. Use a JWT library and your provider's JWKs to verify it. - For privatekeyjwt client authentication, provide
auth_scheme: :private_key_jwtand ensure your key configuration matches the provider requirements. - See OIDC.md for a more complete OIDC overview, example, and links to the relevant specifications.
Debugging
- Set environment variable
OAUTH_DEBUG=trueto enable verbose Faraday logging (uses the client-provided logger). - To mirror a working curl request, ensure you set the same auth scheme, params, and content type. The Quick Example at the top shows a curl-to-ruby translation.
🦷 FLOSS Funding
While ruby-oauth tools are free software and will always be, the project would benefit immensely from some funding. Raising a monthly budget of... "dollars" would make the project more sustainable.
We welcome both individual and corporate sponsors! We also offer a wide array of funding channels to account for your preferences (although currently Open Collective is our preferred funding platform).
If you're working in a company that's making significant use of ruby-oauth tools we'd appreciate it if you suggest to your company to become a ruby-oauth sponsor.
You can support the development of ruby-oauth tools via GitHub Sponsors, Liberapay, PayPal, Open Collective and Tidelift.
| 📍 NOTE |
|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| If doing a sponsorship in the form of donation is problematic for your company
from an accounting standpoint, we'd recommend the use of Tidelift,
where you can get a support-like subscription instead. |
Open Collective for Individuals
No backers yet. Be the first! <!-- OPENCOLLECTIVE-INDIVIDUALS:END -->
Support us with a monthly donation and help us continue our activities. [Become a backer]
Open Collective for Organizations
No sponsors yet. Be the first! <!-- OPENCOLLECTIVE-ORGANIZATIONS:END -->
Become a sponsor and get your logo on our README on GitHub with a link to your site. [Become a sponsor]
Another way to support open-source
How wonderful it is that nobody need wait a single moment before starting to improve the world.
—Anne Frank
I’m driven by a passion to foster a thriving open-source community – a space where people can tackle complex problems, no matter how small. Revitalizing libraries that have fallen into disrepair, and building new libraries focused on solving real-world challenges, are my passions — totaling 79 hours of FLOSS coding over just the past seven days, a pretty regular week for me. I was recently affected by layoffs, and the tech jobs market is unwelcoming. I’m reaching out here because your support would significantly aid my efforts to provide for my family, and my farm (11 🐔 chickens, 2 🐶 dogs, 3 🐰 rabbits, 8 🐈 cats).
If you work at a company that uses my work, please encourage them to support me as a corporate sponsor. My work on gems you use might show up in bundle fund.
I’m developing a new library, floss_funding, designed to empower open-source developers like myself to get paid for the work we do, in a sustainable way. Please give it a look.
Floss-Funding.dev: 👉️ No network calls. 👉️ No tracking. 👉️ No oversight. 👉️ Minimal crypto hashing. 💡 Easily disabled nags
🔐 Security
To report a security vulnerability, please use the Tidelift security contact. Tidelift will coordinate the fix and disclosure.
For more see SECURITY.md.
🤝 Contributing
If you need some ideas of where to help, you could work on adding more code coverage, or if it is already 💯 (see below) check reek, issues, or PRs, or use the gem and think about how it could be better.
We so if you make changes, remember to update it.
See CONTRIBUTING.md for more detailed instructions.
🚀 Release Instructions
See CONTRIBUTING.md.
Code Coverage
🪇 Code of Conduct
Everyone interacting with this project's codebases, issue trackers,
chat rooms and mailing lists agrees to follow the .
🌈 Contributors
Made with contributors-img.
Also see GitLab Contributors: https://gitlab.com/ruby-oauth/oauth2/-/graphs/main
📌 Versioning
This Library adheres to .
Violations of this scheme should be reported as bugs.
Specifically, if a minor or patch version is released that breaks backward compatibility,
a new version should be immediately released that restores compatibility.
Breaking changes to the public API will only be introduced with new major versions.
dropping support for a platform is both obviously and objectively a breaking change
—Jordan Harband (@ljharb, maintainer of SemVer) in SemVer issue 716
I understand that policy doesn't work universally ("exceptions to every rule!"), but it is the policy here. As such, in many cases it is good to specify a dependency on this library using the Pessimistic Version Constraint with two digits of precision.
For example:
ruby
spec.add_dependency("oauth2", "~> 2.0")
📌 Is "Platform Support" part of the public API? More details inside.
SemVer should, IMO, but doesn't explicitly, say that dropping support for specific Platforms is a *breaking change* to an API. It is obvious to many, but not all, and since the spec is silent, the bike shedding is endless. To get a better understanding of how SemVer is intended to work over a project's lifetime, read this article from the creator of SemVer: - ["Major Version Numbers are Not Sacred"][📌major-versions-not-sacred]See CHANGELOG.md for a list of releases.
📄 License
The gem is available as open source under the terms of
the MIT License .
See LICENSE.txt for the official Copyright Notice.
© Copyright
-
Copyright (c) 2017–2025 Peter H. Boling, of
Galtzo.com
, and oauth2 contributors. - Copyright (c) 2011-2013 Michael Bleigh and Intridea, Inc.
🤑 A request for help
Maintainers have teeth and need to pay their dentists. After getting laid off in an RIF in March and filled with many dozens of rejections, I'm now spending ~60+ hours a week building open source tools. I'm hoping to be able to pay for my kids' health insurance this month, so if you value the work I am doing, I need your support. Please consider sponsoring me or the project.
To join the community or get help 👇️ Join the Discord.
To say "thanks for maintaining such a great tool" ☝️ Join the Discord or 👇️ send money.
Please give the project a star ⭐ ♥.
Thanks for RTFM. ☺️
Broken badges
[![Coverage Graph][🔑codecov-g]][🔑codecov] [![CodeCov Test Coverage][🔑codecovi]][🔑codecov]Owner
- Name: Ruby OAuth
- Login: ruby-oauth
- Kind: organization
- Email: floss@galtzo.com
- Location: United States of America
- Website: https://opencollective.com/ruby-oauth
- Repositories: 9
- Profile: https://github.com/ruby-oauth
Ruby Gems for building with OAuth v1.0, 2.0, 2.1 and OIDC
Citation (CITATION.cff)
cff-version: 1.2.0
title: oauth2
message: >-
If you use this work and you want to cite it,
then you can use the metadata from this file.
type: software
authors:
- given-names: Peter Hurn
family-names: Boling
email: peter@railsbling.com
affiliation: railsbling.com
orcid: 'https://orcid.org/0009-0008-8519-441X'
identifiers:
- type: url
value: 'https://github.com/ruby-oauth/oauth2'
description: oauth2
repository-code: 'https://github.com/ruby-oauth/oauth2'
abstract: >-
oauth2
license: See license file
GitHub Events
Total
- Create event: 9
- Issues event: 3
- Release event: 1
- Watch event: 9
- Delete event: 8
- Issue comment event: 35
- Push event: 35
- Pull request event: 15
- Pull request review event: 2
- Fork event: 2
Last Year
- Create event: 9
- Issues event: 3
- Release event: 1
- Watch event: 9
- Delete event: 8
- Issue comment event: 35
- Push event: 35
- Pull request event: 15
- Pull request review event: 2
- Fork event: 2
Committers
Last synced: 6 months ago
Top Committers
| Name | Commits | |
|---|---|---|
| Peter Boling | p****g@g****m | 595 |
| Erik Michaels-Ober | s****k@g****m | 209 |
| Michael Bleigh | m****l@i****m | 62 |
| Jeff Moore | p****f@m****m | 38 |
| Paul Walker | g****b@p****v | 28 |
| depfu[bot] | d****] | 25 |
| Joseph Page | j****e@r****r | 21 |
| Luke Saunders | l****s@g****m | 21 |
| Bo Jeanes | me@b****m | 12 |
| Stan Hu | s****u@g****m | 12 |
| rick | t****e@g****m | 9 |
| Samuel Cochran | s****6@s****m | 8 |
| Niels Ganser | n****s@h****m | 8 |
| Mathias Klippinge | m****e@g****m | 7 |
| Annibelle Boling | a****g@g****m | 7 |
| Ellis Berner | e****r@g****m | 6 |
| Motoshi Nishihira | s****h@g****m | 5 |
| Benjamin Quorning | b****n@q****t | 5 |
| nov matake | n****v@m****p | 5 |
| Lawrence Oluyede | l****e@g****m | 5 |
| Diego Elio 'Flameeyes' Pettenò | f****s@g****m | 4 |
| An Vo | t****n@g****m | 4 |
| dependabot[bot] | 4****] | 4 |
| Edward Rudd | u****e@o****c | 4 |
| Michael Andrews | m****l@s****m | 4 |
| depfu[bot] | b****t@d****m | 4 |
| Nathan Woodhull | w****l@g****m | 3 |
| Nathaniel Bibler | g****t@n****m | 3 |
| Omer Rauchwerger | r****y@g****m | 3 |
| Alexander Lang | a****x@u****m | 3 |
| and 116 more... | ||
Committer Domains (Top 20 + Academic)
Issues and Pull Requests
Last synced: 6 months ago
All Time
- Total issues: 25
- Total pull requests: 66
- Average time to close issues: 11 months
- Average time to close pull requests: 7 days
- Total issue authors: 17
- Total pull request authors: 20
- Average comments per issue: 4.0
- Average comments per pull request: 1.86
- Merged pull requests: 53
- Bot issues: 0
- Bot pull requests: 14
Past Year
- Issues: 0
- Pull requests: 13
- Average time to close issues: N/A
- Average time to close pull requests: 4 days
- Issue authors: 0
- Pull request authors: 4
- Average comments per issue: 0
- Average comments per pull request: 1.77
- Merged pull requests: 11
- Bot issues: 0
- Bot pull requests: 2
Top Authors
Issue Authors
- pboling (8)
- stanhu (2)
- jamietanna (1)
- navidemad (1)
- rvaliouline (1)
- tnpradeep (1)
- ankush-maro (1)
- clarkedb (1)
- jrochkind (1)
- kharamel (1)
- krunalpuri (1)
- laptopmutia (1)
- nbibler (1)
- jeromepl (1)
- mvz (1)
Pull Request Authors
- pboling (19)
- stanhu (13)
- depfu[bot] (10)
- dependabot[bot] (4)
- bquorning (3)
- ahorek (2)
- Aboling0 (2)
- hasghari (1)
- rickselby (1)
- ryogift (1)
- janz93 (1)
- swanson (1)
- bouk (1)
- kaczor1984 (1)
- zavan (1)
Top Labels
Issue Labels
Pull Request Labels
Packages
- Total packages: 1
-
Total downloads:
- rubygems 231,209,246 total
- Total docker downloads: 619,817,949
- Total dependent packages: 533
- Total dependent repositories: 59,498
- Total versions: 68
- Total maintainers: 3
rubygems.org: oauth2
🔐 A Ruby wrapper for the OAuth 2.0 Authorization Framework, including the OAuth 2.1 draft spec, and OpenID Connect (OIDC)
- Homepage: https://oauth2.galtzo.com/
- Documentation: http://www.rubydoc.info/gems/oauth2/
- License: MIT
-
Latest release: 2.0.14
published 6 months ago
Rankings
Funding
- https://github.com/sponsors/pboling