March 6, 2023
  • Announcements
  • Product
  • Auth Connect
  • Capacitor

Announcing Auth Connect 4

Dallas James

Today, we’re excited to announce the release of Auth Connect 4, Ionic’s premier solution for implementing authentication in mobile applications. This release is packed full of updates, modernizing the solution as well as bringing new and highly anticipated features.

Auth Connect exists so that teams can implement best practices in authentication across the web, Android, and iOS without having to build a manual solution. When using Auth Connect, companies can feel confident that their users are secure regardless of what platform they choose to interact on.

Built on the widely adopted authentication standard OAuth 2.0, companies are able to quickly and easily get authentication up and running in their mobile applications and connected to their backend authentication provider. Auth Connect 4 brings all the convenience of easily implementing authentication in your application but drastically improves the developer experience across various javascript frameworks, creates a more transparent storage implementation, and now supports any authentication provider that also supports the OAuth 2.0 standard.

Modernizing Auth Connect

Historically, building plugins to support both Capacitor and Cordova projects meant choosing to build a Cordova plugin, as it could be consumed in both Cordova and Capacitor projects. Companies, including Ionic, found this to be beneficial because it meant reaching all developers with a single project, but it came at a cost, needing to develop a Cordova plugin: brittle projects and tooling, inconsistent platform APIs, and the list goes on. Auth Connect 4 is the pioneer of a new age of plugin development that enables teams to build Capacitor plugins, enjoying the benefits of such, while still being compatible with Cordova.

This change means that Auth Connect 4 is now built on top of Capacitor, but can be used in legacy Cordova applications for teams that still support them. This is enabled by our new Compatibility Plugin that allows a compatible Capacitor plugin to be consumed by a Cordova plugin. This new plugin is supported as part of our open-source Capacitor project, and we highly recommend teams take advantage of it.

Improved Developer Experience

Previous versions of Auth Connect were class-based and very Angular-centric. However, as more teams adopt Capacitor with their preferred frameworks, such as svelte, the class-based architecture made implementing Auth Connect a non-trivial experience. 

To address this, we’ve reworked Auth Connect to a new approach that is considerably more flexible and works well with any framework you might choose. Calling login is simplified:

import { AuthConnect } from ‘@ionic-enterprise/auth’;

const result = await AuthConnect.login(provider, options);

The returned result now contains everything your application needs to know about the user’s Authentication session. You can store that and pass it to any component that needs to know, without needing to maintain a reference to a stateful class.

Transparent Storage

Auth Connect 4’s transition to stateless authentication sessions leads to its next improvement, transparency with how your tokens are saved. Instead of managing the result internal to the plugin and giving you pieces of that state when asked, the relationship is inverted now. 

Auth Connect gives you a serializable representation of your state and then it’s up to you to store that information. Then for any subsequent requests you make using Auth Connect, you simply provide this object to the method.

const result = await AuthConnect.login(provider, options);

const newResult = await AuthConnect.refreshSession(provider, result);

You have full control over how your state is stored with your application. We recommend using Identity Vault to securely store your tokens, protected by biometric access.

Supporting Authentication Providers

The OAuth 2.0 standard is well implemented across many different authentication providers, which provides broad compatibility for anyone looking to use Auth Connect. Unfortunately, not every aspect of how to implement this standard is explicitly defined, which can lead to small differences in how an application should talk to an authentication provider.

Auth Connect previously shipped with nearly a dozen different provider configurations, attempting to cover all of our enterprise customer’s needs. Auth Connect 4 makes a major change in its approach to supporting providers. Instead of explicitly supporting various providers, it instead ships with a much more limited set of pre-defined providers and now also includes all the tools you need to completely customize how Auth Connect interacts with your provider.

If your provider allows you to send custom parameters along with the request to tweak certain behaviors, this is now entirely possible. If your provider is completely unique, you can now create a custom provider to support it. Simply extend the provided abstract AuthProvider class and implement the required methods.

import { AuthProvider } from ‘@ionic-enterprise/auth’;

export class MyProvider extends AuthProvider {
  async authorizeRequest(...) {
    return {
      url: ‘’,
      params: {}
    }
  }
}

A complete example of creating custom providers can be found in our documentation. We’re excited for all of the new authentication providers that Auth Connect can now easily support!

Upgrading to Auth Connect 4

Our Auth Connect 4 upgrade guide will walk you through exactly how to approach this upgrade and help keep the process as simple as possible. If you need help upgrading your application to the new version of Auth Connect, please reach out to Ionic Enterprise Support with any questions you may have.

Get Started

Building out your authentication for your application has never been easier when you use Auth Connect. If you’d like to learn more about how Auth Connect is helping other enterprises build and manage their authentication flows, reach out to sales to schedule a private demo or try it in your app along with other Ionic native solutions with a free trial here.


Dallas James