Welcome to the documentation page for the AeroGearOAuth2 library. This library provides OAuth 2.0 client functionality for iOS applications. OAuth 2.0 is an industry-standard protocol for secure authentication and authorization between different systems.


  • Easy integration with OAuth 2.0 authorization servers
  • Support for popular OAuth 2.0 grant types
  • Secure storage of access tokens and other sensitive data
  • Automatic token refreshing and expiration handling
  • Customizable authentication flows
  • Advanced error handling and notifications
  • Extensive logging capabilities

Getting Started

Follow the steps below to get started with using the AeroGearOAuth2 library in your iOS application:


Before using the AeroGearOAuth2 library, ensure that you have the following:

  • Xcode installed
  • An existing iOS application project
  • Basic understanding of OAuth 2.0 concepts


To integrate the AeroGearOAuth2 library into your iOS application, follow these steps:

  1. Add the library to your project by including the appropriate dependency in your Podfile.
  2. Run the command pod install in the root directory of your project.
  3. Open the generated .xcworkspace file.
  4. Import the AeroGearOAuth2 library into your source files.


To use the AeroGearOAuth2 library in your iOS application, follow these steps:


Before making any API calls, you need to provide the necessary configuration for the library. This typically includes the OAuth 2.0 endpoints and a client ID.

Authentication Flows

The AeroGearOAuth2 library provides several built-in authentication flows to handle different grant types. Choose the appropriate flow for your use case and implement it accordingly.

Making API Calls

Once authenticated, you can start making API calls to the server using the provided access token. The library abstracts the underlying network communication and token management for a smoother integration experience.

Advanced Topics

This section covers advanced topics and customization options for the AeroGearOAuth2 library. If you need more control over the library’s behavior or want to extend its functionality, refer to the topics below:

Custom Grant Types

If the OAuth 2.0 grant type you require is not supported by the library, you can implement a custom grant type.

Custom Authentication Flows

You can create your own authentication flow by implementing the necessary protocols and integrating them into the library.

Persistent Storage

The AeroGearOAuth2 library provides mechanisms to persistently store tokens and other sensitive data securely.

Error Handling

Learn how to handle and respond to different error scenarios that may occur during the OAuth 2.0 process.


Congratulations! You now have a basic understanding of the AeroGearOAuth2 library and its features. You can start integrating it into your iOS application to add OAuth 2.0 client functionality for secure authentication and authorization.

For more details and code examples, refer to the official documentation on the AeroGearOAuth2 library website.