From 3273e901ef20a049f6f407dad7df0f82ccaa81b0 Mon Sep 17 00:00:00 2001 From: Jonathan Grinstead Date: Sun, 31 May 2026 16:42:56 +0100 Subject: [PATCH 1/2] =?UTF-8?q?=F0=9F=93=9D=20Add=20Alternatives=20section?= =?UTF-8?q?=20to=20README?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Closes #674 Replace the informal "if you are in the wrong place" bullet list under the Synopsis with a real "Alternatives" section: a comparison table of the prominent Ruby OAuth/OIDC libraries (omniauth-oauth2, openid_connect, rack-oauth2, doorkeeper, oauth 1.0a) describing each library's role and when you'd reach for it instead of this client gem. Co-Authored-By: Claude Opus 4.8 --- README.md | 24 ++++++++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 1a5f2e5b..3934b439 100644 --- a/README.md +++ b/README.md @@ -124,15 +124,31 @@ Notes -If it seems like you are in the wrong place, you might try one of these: +### Alternatives -* [OAuth 2.0 Spec][oauth2-spec] -* [doorkeeper gem][doorkeeper-gem] for OAuth 2.0 server/provider implementation. -* [oauth sibling gem][sibling-gem] for OAuth 1.0a implementations in Ruby. +This gem is a low-level OAuth 2.0 **client** (it talks _to_ an authorization server to obtain and use tokens). +If that isn't quite what you need, one of these may be a better fit: + +| Library | Role | Why you might use it instead | +|------------------------------------------------|-------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| **this gem** ([oauth2][📜src-gh]) | OAuth 2.0 / 2.1 + OIDC **client** | You are calling an OAuth 2.0 API, or signing in against a provider, and want a small, dependency-light, spec-faithful client with fine-grained control over the request/response cycle. | +| [omniauth][omniauth-gem] + [omniauth-oauth2][omniauth-oauth2-gem] | "Log in with…" **client** (Rack) | You primarily want user _authentication_ ("Log in with GitHub/GitLab/Google") wired into a Rack/Rails app via a strategy, rather than driving the token flow yourself. | +| [openid_connect][openid-connect-gem] | OpenID Connect client & server | You need full [OpenID Connect][oidc-spec] (ID-token validation, discovery, userinfo, etc.) with batteries included. Maintained by [@nov][nov]. | +| [rack-oauth2][rack-oauth2-gem] | OAuth 2.0 client **and** server | You want lower-level Rack primitives, need both client and server pieces, or are building on top of `openid_connect`. Maintained by [@nov][nov]. | +| [doorkeeper][doorkeeper-gem] | OAuth 2.0 **server / provider** | You want to _be_ the authorization server — issuing tokens to other apps — in a Rails/Grape/Sinatra application, rather than acting as a client. | +| [oauth][sibling-gem] | OAuth **1.0a** client & server | The provider you integrate with only speaks the older OAuth 1.0a protocol. This is our sibling gem. | + +See also the [OAuth 2.0 Spec][oauth2-spec] and the [OpenID Connect Spec][oidc-spec]. [oauth2-spec]: https://oauth.net/2/ +[oidc-spec]: https://openid.net/developers/how-connect-works/ [sibling-gem]: https://gitlab.com/ruby-oauth/oauth [doorkeeper-gem]: https://github.com/doorkeeper-gem/doorkeeper +[omniauth-gem]: https://github.com/omniauth/omniauth +[omniauth-oauth2-gem]: https://github.com/omniauth/omniauth-oauth2 +[openid-connect-gem]: https://github.com/nov/openid_connect +[rack-oauth2-gem]: https://github.com/nov/rack-oauth2 +[nov]: https://github.com/nov ## 💡 Info you can shake a stick at From 06d683c95250e1f2d0639d83fa4f042071357871 Mon Sep 17 00:00:00 2001 From: "|7eter l-|. l3oling" Date: Sat, 6 Jun 2026 15:00:33 +0700 Subject: [PATCH 2/2] Potential fix for pull request finding Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> Signed-off-by: |7eter l-|. l3oling --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 70a773c2..97ae58c8 100644 --- a/README.md +++ b/README.md @@ -120,9 +120,9 @@ Notes ### Alternatives This gem is a low-level OAuth 2.0 **client** (it talks _to_ an authorization server to obtain and use tokens). -If that isn't quite what you need, one of these may be a better fit: +If that isn't quite what you need, one of the following libraries may be a better fit (the first row is this gem for comparison): -| Library | Role | Why you might use it instead | +| Library | Role | When to use it | |------------------------------------------------|-------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | **this gem** ([oauth2][📜src-gh]) | OAuth 2.0 / 2.1 + OIDC **client** | You are calling an OAuth 2.0 API, or signing in against a provider, and want a small, dependency-light, spec-faithful client with fine-grained control over the request/response cycle. | | [omniauth][omniauth-gem] + [omniauth-oauth2][omniauth-oauth2-gem] | "Log in with…" **client** (Rack) | You primarily want user _authentication_ ("Log in with GitHub/GitLab/Google") wired into a Rack/Rails app via a strategy, rather than driving the token flow yourself. |