FLUTTER ECOSYSTEM

oauth2

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.

Latest version
2.0.5
30-day downloads
448K
Likes
382
Pub points
160

Package Overview

Package selection guidance compiled from public package information, community data, and project usage.

Overview

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
Supported platformsAndroidiOSWebmacOSWindowsLinux

Install package

flutter pub add oauth2

Categories

Dependencies

Dependency list 4 items

Source repository

Related projects

Rankings