A react native project with a basic github user login authentication using the Github v3 REST API to validate and authenticate the user email and password to get an OAuth Access Token
from a Github OAuth App that i've created in my personal developer settings panel called React Native Github Client. After that, the app will use this OAuth token to make calls to the new Github GraphQL API using the Apollo GraphQL Client.
Feel free to create your own Github OAuth App and update the githupAppClient.js
information with your own if you don't want to use the one that i've created.
The main idea of the project is to use the Github GraphQL API to get the logged user repository list and profile information, and show these two content informations in a bottom tav navigator. The repository list will be show in a swipe to refresh list with error handling and loading data indicator. The user profile content will also handle errors and show loading data indicator.
The project contains tests using Jest
, focused on the components and the login redux actions. The components test will generate snapshots
that can be updated when component changes are made.
The main project libraries are graphql
, apollo-boost
, react-apollo
, React Navigation
, and Jest
. The redux content of the project is used only to help interact with the Github v3 REST API to fetch the login authentication call.
As mentioned in the login screen footer text, this app will not use and share any user information (email, password, profile information and etc). The only purpose of the project is to test and integrate the react native with the new Github GraphQL API.
Clone this repository and run the command:
npm install
and then run the commands for each platform:
react-native run-android
react-native run-ios
Run the command:
npm test
You're also able to run a specific test by running this command for example:
npm test 'ActionLogin-test'
To update a component snapshot, run this command for example:
npm test -- -u 'LocationListItem-test'