Overview
The React-Native-Authentication project focuses on demonstrating user registration, authentication, and accessing protected resources between a React-Native app and a Node.js server. The project includes guidelines for installation and usage, providing details on the versions tested and steps required for setup.
Features
- User Authentication: Demonstrates user registration and login functionality.
- Access to Protected Resources: Guides users on accessing protected resources from the React-Native app.
- Client and Server Installation: Provides installation steps for both the client and server components.
- Token-Based Authentication: Implements token-based authentication using access and refresh tokens.
- Server Configuration: Outlines entry-points for creating users, authenticating, revoking access, and managing users.
Installation
Client Installation
If React-Native is not installed, follow these steps:
- Go to the client/MobileApp directory.
- Run the following commands:
RuniOS:
RunAndroid:
Additional Steps:
- Open client/MobileApp/src/services/api/config.js and replace ’localhost’ with your machine’s IP address.
- Create a file named ’local.properties’ in the /MobileApp/android folder with the SDK path.
- Open an Emulator from Android Studio or connect an Android device.
- Run the following command in the terminal.
Server Installation
If SailsJS is not installed, perform the following steps:
- Go to the server directory.
- Run the following commands:
Run
Additional Steps:
- Access the server from http://localhost:3000/.
- Secure entry-points are provided for user management, authentication, access token issuance, and revoking access.
Summary
The React-Native-Authentication project showcases user authentication from a React-Native app to a Node.js server. It offers clear instructions for client and server installation, token-based authentication, and managing user access to protected resources. By following the outlined steps, users can successfully set up and utilize the authentication system provided in the project.