Yes, you can implement a solution in your React-Native project that allows using SMS or an Authenticator app code as a second factor for basic login without using the Auth0 Lock Screen. Here are the general steps you can follow:
-
Set up your React-Native project and install the necessary dependencies.
-
Implement the basic login functionality using email/password or a magic link. You can use the Auth0 React SDK (
@auth0/auth0-react
) to handle authentication and obtain an access token. -
Implement the second factor authentication screen in your app. This screen should allow the user to enter the SMS or Authenticator app code.
-
Once the user submits the code, you can use the Auth0 SDK to verify the code and obtain a second access token. The Auth0 SDK provides methods to handle multi-factor authentication.
-
Store the second access token securely in your app’s state or storage.
-
Use the second access token to make authenticated API requests to your server or any third-party APIs.
It’s important to note that the specific implementation details may vary depending on your project setup and requirements. The Auth0 documentation provides detailed information on implementing multi-factor authentication and using the Auth0 React SDK, which will help you understand the concepts and make informed decisions for your implementation. I recommend referring to the official Auth0 documentation for detailed configuration and usage instructions: Auth0 React SDK Documentation
By following these steps and leveraging the Auth0 React SDK, you should be able to implement a solution that allows using SMS or an Authenticator app code as a second factor for basic login in your React-Native project.