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!
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!)
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.Swift packages. Ours are battle-tested, more reliable, and less buggy, which provides your users with a better login/logout experience.
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?
⚠️ 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
react-native-auth0GitHub repository. You can find the code here, as well as more than enough documentation to get started using the SDK — it’s all in the README file.
- The migration guide. This document covers the improvements that we made going from version 2 to version 3, changes that might break your current implementations, and changes to the format for callback URLs. If you’re working with projects based on the v2 SDK, make sure you read this.
- Quickstarts. The fastest way to create a new project that uses the Auth0 React Native SDK is to use a quickstart. We have a React Native quickstart and an Expo quickstart.
- Sample projects. These sample projects will help you get acquainted with the Auth0 React Native SDK in general and version 3 in particular:
- Code examples. This is a collection of code snippets that shows you how to perform specific tasks using the SDK.
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!