Skip to content

joelbraga/auth0-rules-list

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Auth0 Rules List

Auth0 is an authentication broker that supports social identity providers as well as enterprise identity providers such as Active Directory, LDAP, Google Apps, Salesforce.

Introduction

In this repository, you'll find an API and Web Application that can dynamically generate, at any time, a list of the applications in your Auth0 account and the rules which apply to each application.

Setup

  • Generate an APIv2 Token with the Token Generator in the Auth0 APIv2 explorer. You must add the read:rules scope to the token.
  • Create a new application in Auth0 Dashboard.
  • If you want the rules list to be only available to a selected whitelist of users:

Installation

$ npm install

Make sure you change the server/config/auth0.config.js file with your newly created application settings:

    module.exports = {
      clientId: 'myClientID',
      clientSecret: 'myClientSecret',
      domain: 'mydomain.auth0.com',
      rulesToken: 'myRulesToken',
    };
  • clientId: The identifier for the application you've created. This can be found in the settings for your app on Auth0.
  • clientSecret: The secret for the application you've created. This can be found in the settings for your app on Auth0.
  • domain: The domain you have from your Auth0 account. This can be found in the settings for your app on Auth0.
  • rulesToken: The token you generated with the Token Generator (read:rules scope).

If you want to view the rules list from the Web Application make sure you change the client/app/core/constants.js file with your newly created application settings:

  angular
    .module('app')
    .constant('auth0Config', {
      clientId: 'myClientID',
      domain: 'mydomain.auth0.com',
    })
    .constant('apiUrl', 'http://localhost:3000')
    .constant('rulesListCloseOthers', false);
  • clientId: The identifier for the application you've created. This can be found in the settings for your app on Auth0.
  • domain: The domain you have from your Auth0 account. This can be found in the settings for your app on Auth0.
  • apiUrl: The endpoint of the auth0 rules list server [Default: http://localhost:3000]
  • rulesListCloseOthers: Control whether expanding a application rules list will cause the others to close.

Run

$ cd server
$ node bin/www

API Usage

GET /api/list

This endpoint is protected by Auth0 authentication.

Example: http://localhost:3000/api/list

Web Application Usage

Access via:

http://localhost:3000/

Example:

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published