by ryanmcdermott

ryanmcdermott /react-native-login

:iphone: An example React Native project for client login authentication

432 Stars 81 Forks Last release: Not found 10 Commits 0 Releases

Available items

No Items, yet!

The developer of this repository has not created any items for sale yet. Need a bug fixed? Help with integration? A different license? Create a request here:


What is it?

is an example React Native project showing how to use a WebView and react-native-cookies to login to your existing backend.

Using a server-side login template that you have already created, this project wraps it with a WebView and checks authentication status using

Once authenticated, a LoggedIn component is rendered showing the user they are authenticated. Cookies are persisted via the WebView so any other component you use that calls
to retrieve AJAX data will also pass on this cookie!

Furthermore, upon opening the app after closing it, the user will stay signed in. When they touch the logout button, their cookies are cleared and they are subsequently redirected to the login component which lives in


What else?

An example server, using Express and Passport is included within this project under the

folder. You can use any server though, just be sure to change
to whatever the name for your persistent cookie is, within the
file. Follow the installation instructions to learn more.

Be sure to also change the URLs in

to reflect the URLs of your production and/or development server. For example, if you are running Android on Genymotion you will need to change this to the appropriate localhost IP address.



Ensure that you have installed absolutely everything listed here


  1. git clone
  2. cd react-native-login/ReactNativeLogin
  3. npm install
  4. cd ../server
  5. npm install
  6. node server.js
  7. To run the iOS version, open another terminal window type
    open ../ReactNativeLogin/iOS/ReactNativeLogin.xcodeproj
  8. Click the play icon in Xcode to start the app


Pull requests are much appreciated and accepted.


Released under the MIT License


Jared Hanson's excellent passport-remember me example

We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.