Baike.dev
All toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
O

oauth

> 安全
Open source

A Ruby wrapper for OAuth 1.0, and 1.0a protocols; clients & servers

673 stars0 likes1 views
WebsiteGitHub

About

A Ruby wrapper for OAuth 1.0, and 1.0a protocols; clients & servers

OAuth

[![Version][versioni]][version] [![GitHub tag (latest SemVer)][⛳️tag-img]][⛳️tag] [![License: MIT][license-img]][license] [![Downloads Rank][dl-ranki]][dl-rank] [![CodeCov Test Coverage][codecovi]][codecov] [![Coveralls Test Coverage][coveralls-img]][coveralls] [![QLTY Test Coverage][qlty-covi]][qlty-cov] [![QLTY Maintainability][qlty-mnti]][qlty-mnt] [![CI Heads][3-hd-wfi]][3-hd-wf] [![CI Runtime Dependencies @ HEAD][12-crh-wfi]][12-crh-wf] [![CI Current][11-c-wfi]][11-c-wf] [![CI Truffle Ruby][9-t-wfi]][9-t-wf] [![CI JRuby][10-j-wfi]][10-j-wf] [![Deps Locked][13-️-wfi]][13-️-wf] [![Deps Unlocked][14-️-wfi]][14-️-wf] [![CI Test Coverage][2-cov-wfi]][2-cov-wf] [![CI Style][5-st-wfi]][5-st-wf] [![Apache SkyWalking Eyes License Compatibility Check][15--wfi]][15--wf]

if ci_badges.map(&:color).detect { it != "green"} ☝️ [let me know][✉️discord-invite], as I may have missed the [discord notification][✉️discord-invite].


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.

[![OpenCollective Backers][osc-backers-i]][osc-backers] [![OpenCollective Sponsors][osc-sponsors-i]][osc-sponsors] [![Sponsor Me on Github][sponsor-img]][sponsor] [![Liberapay Goal Progress][⛳liberapay-img]][⛳liberapay] [![Donate on PayPal][paypal-img]][paypal] [![Buy me a coffee][buyme-small-img]][buyme] [![Donate at ko-fi.com][kofi-img]][kofi]

How will this project approach the September 2025 hostile takeover of RubyGems? ️

I've summarized my thoughts in this blog post.

Synopsis

OAuth 1.0a is an industry-standard protocol for authorization. It is an update to the original OAuth 1.0 protocol, and is used by many popular services.

This is a RubyGem for implementing OAuth 1.0 or 1.0a clients and servers in Ruby applications. See the sibling oauth2 gem for OAuth 2.0, 2.1, & OIDC clients in Ruby.

All dependencies of this gem are signed, so it can be installed with a HighSecurity profile.

  • OAuth 1.0 Spec
  • oauth-tty sibling gem is the OAuth 1.0 / 1.0a CLI.
  • oauth2 sibling gem for OAuth 2.0 implementations in Ruby.

OAuth 1.0 vs 1.0a: What this library implements

This gem targets the OAuth 1.0a behavior (the errata that became RFC 5849), while maintaining compatibility with providers that still behave like classic 1.0. Here are the key differences between the two and how this gem handles them:

  • oauth_callback
    • 1.0: Optional in practice; some providers accepted flows without it.
    • 1.0a: Consumer SHOULD send oauth_callback when obtaining a Request Token, or explicitly use the out-of-band value "oob".
    • This gem: If you do not pass oauth_callback, we default it to "oob" (OUT_OF_BAND). You can opt-out by passing exclude_callback: true.
  • oauth_callback_confirmed
    • 1.0: Not specified.
    • 1.0a: Service Provider MUST return oauth_callback_confirmed=true with the Request Token response. This mitigates session fixation.
    • This gem: Parses token responses but does not include oauth_callback_confirmed in the signature base string (it is a response param, not a signed request param).
  • oauth_verifier
    • 1.0: Not present.
    • 1.0a: After the user authorizes, the Provider returns an oauth_verifier to the Consumer, and the Consumer MUST include it when exchanging the Request Token for an Access Token.
    • This gem: Supports oauth_verifier across request helpers and request proxies; pass oauth_verifier to get_access_token in 3‑legged flows.

Practical guidance:

  • For 3‑legged flows, always supply oauth_callback when calling consumer.get_request_token, and include oauth_verifier when calling request_token.get_access_token.
  • For command‑line or non-HTTP clients, use the special OUT_OF_BAND value ("oob") as the oauth_callback and prompt the user to paste back the displayed verifier.

References: RFC 5849 (OAuth 1.0), sections 5–7; 1.0a security errata.

Ruby OAuth has been maintained by a large number of talented individuals over the years. The primary maintainer since 2020 is Peter Boling (@pboling).

Info you can shake a stick at

Tokens to Remember [![Gem name][⛳️name-img]][⛳️gem-name] [![Gem namespace][⛳️namespace-img]][⛳️gem-namespace]
Works with JRuby [![JRuby 9.2 Compat][jruby-9.2i]][jruby-9.2-wf] [![JRuby 9.3 Compat][jruby-9.3i]][jruby-9.3-wf]
[![JRuby 9.4 Compat][jruby-9.4i]][jruby-9.4-wf] [![JRuby 10.0 Compat][jruby-10.0i]][jruby-10.0-wf] [![JRuby current Compat][jruby-c-i]][10-j-wf] [![JRuby HEAD Compat][jruby-headi]][3-hd-wf]
Works with Truffle Ruby [![Truffle Ruby 22.3 Compat][truby-22.3i]][truby-22.3-wf] [![Truffle Ruby 23.0 Compat][truby-23.0i]][truby-23.0-wf] [![Truffle Ruby 23.1 Compat][truby-23.1i]][truby-23.1-wf]
[![Truffle Ruby 24.2 Compat][truby-24.2i]][truby-24.2-wf] [![Truffle Ruby 25.0 Compat][truby-25.0i]][truby-25.0-wf] [![Truffle Ruby 33.0 Compat][truby-33.0i]][truby-33.0-wf] [![Truffle Ruby current Compat][truby-c-i]][9-t-wf] [![Truffle Ruby HEAD Compat][truby-headi]][3-hd-wf]
Works with MRI Ruby 4 [![Ruby current Compat][ruby-c-i]][11-c-wf] [![Ruby HEAD Compat][ruby-headi]][3-hd-wf]
Works with MRI Ruby 3 [![Ruby 3.0 Compat][ruby-3.0i]][ruby-3.0-wf] [![Ruby 3.1 Compat][ruby-3.1i]][ruby-3.1-wf] [![Ruby 3.2 Compat][ruby-3.2i]][ruby-3.2-wf] [![Ruby 3.3 Compat][ruby-3.3i]][ruby-3.3-wf] [![Ruby 3.4 Compat][ruby-3.4i]][ruby-3.4-wf]
Works with MRI Ruby 2 ![Ruby 2.3 Compat][ruby-2.3i]
[![Ruby 2.4 Compat][ruby-2.4i]][ruby-2.4-wf] [![Ruby 2.5 Compat][ruby-2.5i]][ruby-2.5-wf] [![Ruby 2.6 Compat][ruby-2.6i]][ruby-2.6-wf] [![Ruby 2.7 Compat][ruby-2.7i]][ruby-2.7-wf]
Support & Community [![Join Me on Daily.dev's RubyFriends][✉️ruby-friends-img]][✉️ruby-friends] [![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]
Source [![Source on GitLab.com][src-gl-img]][src-gl] [![Source on CodeBerg.org][src-cb-img]][src-cb] [![Source on Github.com][src-gh-img]][src-gh] [![The best SHA: dQw4w9WgXcQ!][kloc-img]][kloc]
Documentation [![Current release on RubyDoc.info][docs-cr-rd-img]][yard-current] [![YARD on Galtzo.com][docs-head-rd-img]][yard-head] [![Maintainer Blog][maint-blog-img]][maint-blog] [![GitLab Wiki][gl-wiki-img]][gl-wiki] [![GitHub Wiki][gh-wiki-img]][gh-wiki]
Compliance [![License: MIT][license-img]][license] [![Apache license compatibility: Category A][license-compat-img]][license-compat] [![ilo-declaration-img]][ilo-declaration] [![Security Policy][security-img]][security] [![Contributor Covenant 2.1][conduct-img]][conduct] [![SemVer 2.0.0][semver-img]][semver]
Style [![Enforced Code Style Linter][rlts-img]][rlts] [![Keep-A-Changelog 1.0.0][keep-changelog-img]][keep-changelog] [![Gitmoji Commits][gitmoji-img]][gitmoji] [![Compatibility appraised by: appraisal2][appraisal2-img]][appraisal2]
Maintainer ️ [![Follow Me on LinkedIn][linkedin-img]][linkedin] [![Follow Me on Ruby.Social][ruby-mast-img]][ruby-mast] [![Follow Me on Bluesky][bluesky-img]][bluesky] [![Contact Maintainer][maint-contact-img]][maint-contact] [![My technical writing][‍♂️devto-img]][‍♂️devto]
... [![Find Me on WellFound:][✌️wellfound-img]][✌️wellfound] [![Find Me on CrunchBase][crunchbase-img]][crunchbase] [![My LinkTree][linktree-img]][linktree] [![More About Me][‍♂️aboutme-img]][‍♂️aboutme] [][berg] [][hub] [][hut] [][lab]

Compatibility

Compatible with MRI Ruby 2.3+, and concordant releases of JRuby, and TruffleRuby. CI workflows and Appraisals are generated for MRI Ruby 2.4+. This test floor is configured by ruby.test_minimum in .kettle-jem.yml and may be higher than the gem's runtime compatibility floor when legacy Rubies are not practical for the current toolchain.

The amazing test matrix is powered by the kettle-dev stack.

How kettle-dev manages complexity in tests

Gem Source Role Daily download rank
appraisal2 GitHub multi-dependency Appraisal matrix generation
appraisal2-rubocop GitHub RuboCop Appraisal generator integration
kettle-dev GitHub development, release, and CI workflow tooling
kettle-jem GitHub Appraisals & CI workflow templates
kettle-soup-cover GitHub SimpleCov coverage policy and reporting
kettle-test GitHub standard test runner and coverage harness
rubocop-lts GitHub Ruby-version-aware linting
turbo_tests2 GitHub parallel test execution

Federated DVCS

Find this repo on federated forges (Coming soon!)

Federated [DVCS][d-in-dvcs] Repository Status Issues PRs Wiki CI Discussions
[ruby-oauth/oauth on GitLab][src-gl] The Truth [][gl-issues] [][gl-pulls] [][gl-wiki] Tiny Matrix ➖
[ruby-oauth/oauth on CodeBerg][src-cb] An Ethical Mirror ([Donate][cb-donate]) [][cb-issues] [][cb-pulls] ➖ ⭕️ No Matrix ➖
[ruby-oauth/oauth on GitHub][src-gh] Another Mirror [][gh-issues] [][gh-pulls] [][gh-wiki] Full Matrix
️ [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]

Issues· 0 open

View all issuesOpen on GitHub

No open issues yet, or sync has not completed.

> Tags

Rubyauthenticationauthorizationoauthoauth-client

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 17, 2026
Category安全
PricingOpen source

> Related tools

O
OWASP ZAP
开源 Web 应用安全扫描器
O
owasp-wstg-tracker
Simple web app to track OWASP WSTG security testing progress
H
homebridge-mi-gateway-security
XiaoMi Gateway Security plugin for HomeBridge.