A client library for authenticating with a remote service via OAuth2 on behalf of a user, and making authorized HTTP requests with the user's OAuth2 credentials.
Package selection guidance compiled from public package information, community data, and project usage.
The oauth2 package is a Dart client library that enables applications to authenticate with remote services using the OAuth2 protocol. It facilitates user authorization, token management, and secure HTTP requests using obtained OAuth2 credentials. Designed for use across multiple platforms—including mobile, web, and desktop—it simplifies integration with OAuth2-supported APIs such as Google, GitHub, and others. The package handles flows like authorization code and implicit grant, ensuring secure and standardized authentication workflows.
Use cases
User login with third-party providers
Secure API access with OAuth2 tokens
Integrating with OAuth2-enabled services
Handling token refresh and storage
Building authenticated web and mobile apps
Key features
Supports OAuth2 authorization flows
Manages access and refresh tokens
Provides HTTP client with automatic token injection
Cross-platform compatibility
Easy integration with REST APIs
Suitable for
Mobile and web apps requiring OAuth2
Developers building auth-heavy applications
Teams integrating with major OAuth2 providers
Apps needing secure token handling
Considerations
Requires careful handling of token storage
Needs proper error handling for failed authorizations
Depends on external OAuth2 service configuration
Not suitable for server-side-only OAuth2 flows
Must follow security best practices for credential management
Original README
Original README snapshot from the linked source repository. Visit the repository for the latest content.
Overview
This repository is home to tooling related Dart packages. Generally, this means
packages published through the
tools.dart.dev publisher that
don't naturally belong to other topic monorepos (like
dart-lang/build,
dart-lang/test, or
dart-lang/shelf).
A client library for authenticating with a remote service via OAuth2 on behalf of a user, and making authorized HTTP requests with the user's OAuth2 credentials.