Pepperoni used to be bundled with Auth0 but it has been removed by popular request.
You can follow this guide to get it back.
First, get the react-native-lock
npm package.
$ npm i -S react-native-lock@futurice/react-native-lock#feature/customizedTheme
Then link the package to IOS and Android builds with the link
command:
$ react-native link react-native-lock
If you don't want to use Auth0, or you want to take it into use later, you can skip this step for now.
-
Before you start you need to create a new application in Auth0
-
Set
AUTH0_CLIENT_ID
andAUTH0_DOMAIN
inenv.js
according to your application you created in AuthAUTH0_CLIENT_ID: '<CLIENT_ID>', AUTH0_DOMAIN: '<ACCOUNT_NAME>.eu.auth0.com'
-
Follow the steps for your platform below. Check the official instructions for more information.
iOS
- Change default values in the customiseTheme method in
src/services/auth0.js
- If you want to add images, copy them in the root
images
folder and add them via Xcode > file > add files to the project in 3 different resolutions (needs to be original and x2 and x3 versions) - All changeable values can be retrieved here
Android
- Change default values for the AppTheme.Lock in
android/app/src/main/res/values/styles.xml
- Add images in
android/app/src/main/res/mipmap-<hdpi|mdpi|xhdpi|xxhdpi>
in 4 different resolutions - All changeable values can be retrieved here
You can see example of code used in Pepperoni when Auth0 was still bundled here.
The files you'll be interested in are: