How to use the react-native-auth0 function in react-native-auth0

To help you get started, we’ve selected a few react-native-auth0 examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github streamplace / streamplace / packages / streamplace-ui / src / auth / auth.native.js View on Github external
import Auth0 from "react-native-auth0";
import SP from "sp-client";
import {
} from "../constants";
import { AsyncStorage } from "react-native";
import jwtDecode from "jwt-decode";

const auth0 = new Auth0({
  domain: AUTH0_DOMAIN,
  clientId: AUTH0_CLIENT_ID

 * no-op; exists for API compatibility with the web auth module
export async function checkLogin() {
  const token = await AsyncStorage.getItem(TOKEN_STORAGE_KEY);
  const user = await SP.connect({ token });
  // Allow the API server to issue us a new token, then...
  await AsyncStorage.setItem(TOKEN_STORAGE_KEY, SP.token);
  return user;

export async function login({ email, password }) {


React Native toolkit for Auth0 API

Latest version published 20 days ago

Package Health Score

84 / 100
Full package analysis

Popular react-native-auth0 functions