Coder Social home page Coder Social logo

spikeattempt's Introduction

SpikeAttempt

This was taken from Auth0's sample code. However, I figured out how to use react native before working on the Auth0 sample. The authorization is an import along with an cliend id and access key. After using that I can access the users who have registered and logged into my app. An API can get that information from the website.

Auth0 React Native Samples - Login

1. Install

Clone the repository and install the dependencies with Yarn:

git clone [email protected]:auth0-samples/auth0-react-native-sample.git
cd auth0-react-native-sample
yarn install

iOS Applications only

Change the directory into the ios folder and run the following command to install the SDK pod with CocoaPods:

cd ios
pod install

You should see the A0Auth0 pod being installed and linked to the sample app.

Android applications only

Open the android/app/src/main/AndroidManifest.xml file and locate the Intent Filter declaration. You must update the android:host property to use your Auth0 Domain from the step above.

<data
  android:host="{YOUR_DOMAIN}"
  android:pathPrefix="/android/${applicationId}/callback"
  android:scheme="${applicationId}" />

The applicationId will get auto-completed dynamically.

2. Configure Auth0

  1. Copy the app/auth0-configuration.js.example in this sample to app/auth0-configuration.js.
  2. Open your Applications in the Auth0 dashboard.
  3. Select your existing Application from the list or click Create Application at the top to create a new Application of type Native.
  4. On the Settings tab for the Application, copy the "Client ID" and "Domain" values and paste them into the app/auth0-credentials.js file created above.
  5. In the Allowed Callback URLs field, paste in the text below and replace YOUR_DOMAIN with the Domain from above. These URLs are required for the authentication result to be redirected from the browser to the app:
com.auth0samples://YOUR_DOMAIN/ios/com.auth0samples/callback,
com.auth0samples://YOUR_DOMAIN/android/com.auth0samples/callback
  1. Add the same values to the Allowed Logout URLs field as well. These are required for the browser to redirect back to the app after the user logs out.
  2. Scroll down and click Save Changes.

3. Run The App

Run your app on an emulator, simulator, or your own connected device.

  • To run the app on iOS run yarn run ios.
  • To run the app on Android run yarn run android.

The first run may take a while to fully launch. Keep an eye out for confirmation windows and watch the terminal for output and results.

Note: If you get an error about "No bundle URL present" try clicking reload in the app or running yarn run ios again.

spikeattempt's People

Contributors

hornerjustint avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.