Giter Site home page Giter Site logo

expo-auth0-example-2020's Introduction

  • Updated with Expo 37.
  • With examples of Auth0 login and fetching data.
  • React-Navigation 5 stack with Header, and drawer.
  • Using Expo features:
    • Interesting mainAppState reducer soulution.
    • Localization i18n.
    • Expo Fonts.
    • Splash screen.
    • Examples of deep linking to external apps.
    • You can find example of how to deep link to your app here:
    • Expo WebView.
    • Expo Web in-app-modal with cookies share.

auth0-example

Credits to https://github.com/expo/auth0-example for creating the original repo two years ago. It is currently not maintained and cannot be upgraded to new Expo versions.

Setup

  • Create your own application client on Auth0.

  • In the application settings, you must add the redirect URL for your Expo application that is coming from the AuthSession module (built-in in Expo).

    The structure of the URL is: https://auth.expo.io/@your-username/your-expo-app-slug

    Your Expo app slug can be found in the app.json file.

    You can get the full redirect URL by simply logging AuthSession.getRedirectUrl() in your own codebase.

Managing Secrets Expo Auth0

Create a env.ts file on the ./config directory, with auth0ClientId and auth0Domain values from your Auth0 application.

(env.ts is already on the .gitignore file)

Application Settings

#./config/env.ts

const Env = {
  dev: {
    apiUrl: localhost,
    auth0ClientId: '*****',
    auth0Domain: '*****',
  },
  staging: {
    apiUrl: "[your.staging.api.here]",
  },
  prod: {
    apiUrl: "[your.production.api.here]",
  }
};

export default Env;

Install & Run

If you are using NPM:

npm install
npm start

If you are using yarn:

yarn install
yarn start

Expo

expo build:ios --release-channel staging expo build:android --release-channel staging expo publish --release-channel staging

expo-auth0-example-2020's People

Contributors

guyavraham avatar

Watchers

 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.