Open-Awesome
CategoriesAlternativesStacksSelf-HostedExplore
Open-Awesome

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

TermsPrivacyAboutGitHubRSS
  1. Home
  2. Rust
  3. yup-oauth2

yup-oauth2

Apache-2.0Rust

A Rust library implementing multiple OAuth 2.0 flows including Device, Installed, and Service Account authorization.

Visit WebsiteGitHubGitHub
242 stars118 forks0 contributors

What is yup-oauth2?

yup-oauth2 is a Rust library that implements multiple OAuth 2.0 authorization flows, including Device, Installed Application, and Service Account flows. It provides token sources that yield HTTP Bearer tokens for authenticating API requests, originally designed for Google services but adaptable to other OAuth providers.

Target Audience

Rust developers building applications that need to authenticate with OAuth 2.0 providers, particularly those integrating with Google APIs or similar services requiring device, installed app, or service account authorization.

Value Proposition

Developers choose yup-oauth2 for its comprehensive support of multiple OAuth flows in a single Rust crate, its flexibility to work with raw HTTP requests or higher-level API clients, and its proven reliability through integration with projects like google-apis-rs.

Overview

An oauth2 client implementation providing the Device, Installed, Service Account, and several more flows.

Use Cases

Best For

  • Implementing OAuth 2.0 device flow in Rust applications
  • Authenticating installed desktop or mobile applications with OAuth providers
  • Setting up server-to-server communication using service account credentials
  • Building Rust clients for Google APIs that require OAuth authentication
  • Creating generic OAuth 2.0 clients that work with providers similar to Google
  • Managing Bearer token retrieval and refresh for HTTP API requests

Not Ideal For

  • Projects that depend on the synchronous google-apis-rs crate for Google API integration
  • Applications requiring OAuth 2.0 flows like implicit grant or PKCE that aren't explicitly mentioned in the README
  • Teams needing a stable, production-ready async solution for non-Google OAuth providers due to limited testing
  • Developers looking for a plug-and-play OAuth library with extensive, beginner-friendly documentation and minimal configuration

Pros & Cons

Pros

Comprehensive Flow Support

Implements device, installed application, and service account flows, covering key OAuth 2.0 scenarios for diverse application types, as highlighted in the README's features.

Provider Flexibility

Designed generically to work with any OAuth provider following Google-like patterns, though the README admits it's primarily tested with Google, offering adaptability.

Runtime Versatility

Offers multiple crate versions for different Hyper and Tokio runtimes (e.g., version 5 for Tokio 1.0), easing integration into various Rust projects.

Proven Integration

Originally developed for and integrated with google-apis-rs, indicating battle-tested reliability for Google API authentication in real-world use.

Cons

Breaking Compatibility

Version 4+ introduces async support but is incompatible with google-apis-rs, a major downstream project, forcing difficult migration choices for existing users.

Unstable Async Ecosystem

The recommended async-google-apis for new versions is alpha-quality, posing risks for production use in async Google API integrations, as noted in the README.

Limited Provider Testing

Admits being primarily tested with Google; other providers might require manual fixes or contributions, increasing setup complexity for non-Google use.

Version Fragmentation

Multiple versions for different runtimes (e.g., versions 1-5) can confuse users about which crate to use, especially with the shift from sync to async.

Frequently Asked Questions

Quick Stats

Stars242
Forks118
Contributors0
Open Issues26
Last commit5 months ago
CreatedSince 2015

Tags

#oauth2#google-apis#authentication#bearer-tokens#authorization#api-client#google#rust#http-client

Built With

h
hyper
R
Rust
T
Tokio

Links & Resources

Website

Included in

Rust56.6k
Auto-fetched 18 hours ago

Related Projects

jsonwebtokenjsonwebtoken

JWT lib in rust

Stars2,075
Forks351
Last commit11 days ago
oauth2oauth2

Extensible, strongly-typed Rust OAuth2 client library

Stars1,198
Forks206
Last commit5 months ago
oxide-authoxide-auth

A OAuth2 server library, for use in combination with actix or other frontends, featuring a set of configurable and pluggable backends.

Stars781
Forks101
Last commit5 months ago
totp-rstotp-rs

RFC-compliant TOTP implementation with ease of use as a goal and additionnal QoL features.

Stars267
Forks35
Last commit18 days 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