close icon
SDK

Introducing Auth0 React Native SDK 3.0!

We added support for hooks and rewrote it in TypeScript, made API improvements, improved Expo, Android, and iOS integration, and we think you’ll like it.

August 28, 2023

We’re excited to announce the general availability of version 3.0 of our React Native SDK! In this latest version, we’ve transformed our react-native-auth0 SDK to work with two goals in mind:

  • To work with the latest and greatest version of React Native, and
  • To create improvements to make your life as a developer easier.

Read on to find out more about the new version of the SDK!

What Changed?

We wanted to improve your developer experience and let you focus on what your applications do. We listened to your feedback, made changes to remove the obstacles that were getting in your way, and cut out the confusing parts that were slowing you down.

In this new version of the SDK, we made the following changes:

100% support for hooks. You’ve been asking for access to our authentication APIs (such as login via SMS, email, and so on) through hooks. That makes sense — after all, the general consensus is that React hooks generally make for more concise code that’s easier to read and maintain. So we went “all in”: our SDK now has 100% support through hooks! (And yes, you can still use it “the old way” too!)

Improved user object and credentials. The User object (available through our hooks API) isn’t static anymore and doesn’t just capture a snapshot of the user’s information at the moment of login. Instead, it dynamically updates to reflect changes to the user in real time. You can now force-refresh the user credentials, check their validity, and you can do so using either hooks or classes.

Expo improvements. The SDK now seamlessly integrates into any Expo project with a single line of configuration. You just specify the domain, and the SDK automatically generates the other configuration lines. We’ve also raised the minimum supported version of Expo to a more stable version (currently v48).

Completely rewritten in TypeScript. This allows us to take advantage of TypeScript’s type safety and removes any confusion about what data you provide to and receive from the SDK’s methods. (It also has the side benefit of making the SDK easier to maintain and update, which we believe will provide future benefits for you.)

Improved Android/iOS interoperability. We switched from React Native’s Android and iOS SDKs for web authentication to our own SDKs, which we use in the Auth0.Android and Auth0.Swift packages. Ours are battle-tested, more reliable, and less buggy, which provides your users with a better login/logout experience.

Requirements

Naturally, you’ll need an Auth0 account to use the SDK. You can sign up for a free account here; the free version supports unlimited login/logout for up to 7,000 users and ten applications.

Which versions of React Native are supported?

Version 3 of our React Native SDK targets apps using React Native version 0.60.5 and up.

Is Expo supported?

This SDK is compatible with Expo custom development client and EAS (Expo Application Services) builds.

⚠️ Please note that the SDK is not compatible with the Expo Go app because of the SDK’s use of custom native code.

Which versions of Android and iOS are supported?

Version 3 of our React Native SDK supports the following mobile platform versions:

  • Android SDK 28, also known as “Android 9” or “Pie” (or later). Android 9 was released in August 2018. 84% of devices active in the Play Store at the time of writing (August 2023) will run applications targeting this Android version. The oldest phones that support this version of Android date back to late 2017.
  • iOS 13 (or later). iOS 13 was released in September 2020. As of the end of February 2023, almost 88% of iOS users were running iOS 16, with nearly 12% running iOS 15. iOS 14 users accounted for about 0.2% of users, while users of iOS 13 and earlier comprised the remaining 0.3%. The oldest iPhones that will run iOS 13 are the 6S and 6s Plus, which date back to 2015. Simply put, you’re not really leaving anyone behind by setting iOS 13 as the oldest supported version.

How to Find Out More

Summary

We made version 3 of the React Native for Auth0 SDK based on your feedback to improve the developer and user experiences. With support for hooks, better integration with both Android and iOS, strong typing support, and fewer bugs, we’re sure you’ll enjoy working with this version!

  • Twitter icon
  • LinkedIn icon
  • Faceboook icon