Open-Awesome
CategoriesAlternativesStacksSelf-HostedExplore
Open-Awesome

© 2026 Open-Awesome. Curated for the developer elite.

TermsPrivacyAboutGitHubRSS
  1. Home
  2. Gems
  3. omniauth-weibo-oauth2

omniauth-weibo-oauth2

MITRuby

OmniAuth OAuth2 strategy for integrating Weibo (Sina Weibo) authentication into Ruby applications.

GitHubGitHub
134 stars49 forks0 contributors

What is omniauth-weibo-oauth2?

OmniAuth Weibo OAuth2 is a Ruby gem that provides an OAuth2 strategy for the OmniAuth authentication framework, enabling Ruby applications to authenticate users via Weibo (Sina Weibo). It simplifies integration with Weibo's OAuth2 API by handling token exchange and returning structured user data, allowing developers to add social login functionality to their web applications.

Target Audience

Ruby developers building web applications with Rails or other Rack-compatible frameworks who need to implement Weibo-based social authentication for users in China or Chinese-speaking regions.

Value Proposition

Developers choose this gem because it offers a standardized, secure, and configurable way to integrate Weibo OAuth2, including features like customizable user image sizes and patches for known security vulnerabilities, reducing the complexity of direct API implementation.

Overview

OmniAuth Oauth2 strategy for weibo.com.

Use Cases

Best For

  • Adding Weibo social login to Ruby on Rails applications for user authentication.
  • Integrating Weibo OAuth2 in Rack-based Ruby web frameworks like Sinatra or Hanami.
  • Fetching structured user data from Weibo, including profile images in configurable sizes (small, middle, large, original).
  • Securely handling Weibo authentication with updates for vulnerabilities like CVE-2019-17268.
  • Building applications targeting Chinese users who primarily use Weibo for social media.
  • Implementing multi-provider authentication systems using OmniAuth with Weibo as one of the strategies.

Not Ideal For

  • Applications targeting global users or requiring authentication from multiple non-Chinese social platforms
  • Projects built with non-Ruby frameworks (e.g., Python, Node.js) or those avoiding OmniAuth dependencies
  • Teams needing highly customizable OAuth flows with extensive API interactions beyond standard login

Pros & Cons

Pros

Configurable Image Sizes

Allows setting user profile images to small, middle, large, or original sizes via the :image_size option, as shown in the authentication hash example.

Security Updates Included

Patches known vulnerabilities like CVE-2019-17268, ensuring safer OAuth2 handling, as highlighted in the README's security section.

Seamless OmniAuth Integration

Functions as standard Rack middleware with simple Rails configuration, reducing setup complexity, per the usage example in the README.

Detailed Authentication Hash

Returns structured user data including credentials, info, and raw API responses, simplifying profile access as demonstrated in the example.

Cons

Single-Provider Limitation

Only supports Weibo OAuth2, requiring additional gems for other authentication providers, which increases dependency management.

OmniAuth Framework Dependency

Mandates use of the OmniAuth ecosystem, adding overhead and complexity for projects not already integrated with it.

Limited Advanced Configuration

Focuses on basic OAuth2 flows; lacks built-in support for advanced features like custom scopes or offline access without manual tweaks.

Frequently Asked Questions

Quick Stats

Stars134
Forks49
Contributors0
Open Issues0
Last commit1 year ago
CreatedSince 2012

Tags

#rack-middleware#oauth2#authentication#weibo#ruby-gem#omniauth#ruby#api-integration#social-login

Built With

O
OAuth2
R
Ruby
O
OmniAuth
R
Rack

Included in

Gems2.8k
Auto-fetched 19 hours ago

Related Projects

omniauth-google-oauth2omniauth-google-oauth2

Oauth2 strategy for Google

Stars1,522
Forks418
Last commit1 month ago
omniauth-facebookomniauth-facebook

Facebook OAuth2 Strategy for OmniAuth

Stars1,265
Forks398
Last commit6 days ago
omniauth-twitteromniauth-twitter

OmniAuth strategy for Twitter

Stars576
Forks164
Last commit18 days ago
omniauth-githubomniauth-github

GitHub strategy for OmniAuth

Stars463
Forks157
Last commit3 years ago
Community-curated · Updated weekly · 100% open source

Found a gem we're missing?

Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.

Submit a projectStar on GitHub