mise-react-redux-auth0

1.1.7 • Public • Published

mise-react-redux-auth0

NPM module for Auth0 services


Auth module will be used across various applications, providing the same API for Auth0 authentication services.

Usage

import AuthConstructor from "mise-react-redux-auth0";

const Auth0 = new AuthConstructor(config);

/* ... */

API

  • AuthConstructor {object}: Default export of an Auth constructor. Takes a config object. More info in the next section
  • authReducer {function}: Named export of a predefined auth redux reducer
  • callbackReducer {function}: Named export of a predefined callback redux reducer
  • getAuthActions {function}: Named export of a function that takes an Auth instance, and returns redux action creators
  • Callback {Component}: Named export of a React Component used to handle authentication routing
  • SecuredRoute {Component}: Named export of a React Component that secures regular, non-authenticated routes

AuthConstructor Config API

  • domain {REQUIRED, string}: Your Auth0 account domain
  • clientID {REQUIRED, string}: The Client ID found on your Application settings page
  • redirectUri {OPTIONAL, string}: The URL where Auth0 will call back to with the result of a successful or failed authentication. It must be whitelisted in the "Allowed Callback URLs" in your Auth0 Application settings
  • scope {OPTIONAL, string}: The default scope used for all authorization requests
  • audience {OPTIONAL, string}: The default audience, used if requesting access to an API
  • responseType {OPTIONAL, string}: Response type for all authentication requests. It can be any space separated list of the values code, token, id_token. If you don't provide global responseType, you will have to provide a responseType for each method that you use
  • responseMode {OPTIONAL, string}: The default responseMode used, defauts to 'fragment'. The parseHash method can be used to parse authentication responses using fragment response mode. Supported values are query, fragment, and form_post. The query value is only supported when responseType is code.
  • __disableDeprecationWarnings {OPTIONAL, boolean}: Indicates if deprecation warnings should be output to the browser console, defaults to false

Instance API

  • In progress...

Download & Installation

Make sure you have .npmrc setup so you can pull packages from Azure DevOps registry.

npm i mise-react-redux-auth0

or

yarn add mise-react-redux-auth0

Readme

Keywords

Package Sidebar

Install

npm i mise-react-redux-auth0

Weekly Downloads

0

Version

1.1.7

License

ISC

Unpacked Size

154 kB

Total Files

15

Last publish

Collaborators

  • marknadsinformation