Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/danwakeem/generator-auth0-rules
Yeoman generator to create and maintain auth0 rules
https://github.com/danwakeem/generator-auth0-rules
Last synced: 27 days ago
JSON representation
Yeoman generator to create and maintain auth0 rules
- Host: GitHub
- URL: https://github.com/danwakeem/generator-auth0-rules
- Owner: Danwakeem
- License: mit
- Created: 2019-08-18T20:11:47.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2023-01-04T07:31:56.000Z (almost 2 years ago)
- Last Synced: 2024-10-12T21:25:06.472Z (27 days ago)
- Language: JavaScript
- Size: 1.22 MB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 14
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# generator-auth0-rules [![NPM version][npm-image]][npm-url] [![Build Status][travis-image]][travis-url] [![Dependency Status][daviddm-image]][daviddm-url] [![Coverage percentage][coveralls-image]][coveralls-url]
> Yeoman generator to create and deploy auth0 rules## Installation
First, install [Yeoman](http://yeoman.io) and generator-auth0-rules using [npm](https://www.npmjs.com/) (we assume you have pre-installed [node.js](https://nodejs.org/)).
```bash
npm install -g yo
npm install -g generator-auth0-rules
```Then generate your new project:
```bash
yo auth0-rules
```And finally generate additional auth0 rules:
```bash
yo auth0-rules:rule
```## How to determine order of my rules?
There will be a `rules.meta.js` file that is created and will maintain a list of all of your rule files. The order that these rules are set in this list will determine what order your rule shoes up in your auth0 rule list. You can also set the `enabled` flag to determine if a rule is active or not.## How to deploy rules with [Travis CI](https://travis-ci.com/)
When you generate a project using this scaffold you will be given a `deploy.js` script at the root of your project that will be called from your `travis.yml`. So when you create the project and add rules via the command above they will be packaged and deployed to your auth0 account using the deploy script running in your [Travis CI](https://travis-ci.com/) account.Obviously, you do not want your auth0 credentials in your repo so this project assumes that you have them set as secret environment files on your Travis CI project. The following keys will need to be set in your [Travis CI](https://travis-ci.com/) project settings.
- `CLIENT_ID`
- `CLIENT_SECRET`
- `DOMAIN`You can find your `CLIENT_ID` and `CLIENT_SECRET` in your auth0 account if you go to `Application > API Explorer > Settings`
![Auth0 Credentials](https://s3.amazonaws.com/danwakeem.public.images/github/Auth0+Account.png)
The `API Explorer` machine to machine application in auth0 comes with each account by default. If you have removed this account for some reason or would you like to use a different account you may do so by creating a new [machine to machine application](https://auth0.com/machine-to-machine) and granting the following permissions.
- `read:rules`
- `update:rules`
- `create:rules`## Getting To Know Yeoman
* Yeoman has a heart of gold.
* Yeoman is a person with feelings and opinions, but is very easy to work with.
* Yeoman can be too opinionated at times but is easily convinced not to be.
* Feel free to [learn more about Yeoman](http://yeoman.io/).## License
MIT © [Danwakeem](https://www.danwakeem.com)
[npm-image]: https://badge.fury.io/js/generator-auth0-rules.svg
[npm-url]: https://npmjs.org/package/generator-auth0-rules
[travis-image]: https://travis-ci.com/Danwakeem/generator-auth0-rules.svg?branch=master
[travis-url]: https://travis-ci.com/Danwakeem/generator-auth0-rules
[daviddm-image]: https://david-dm.org/Danwakeem/generator-auth0-rules.svg?theme=shields.io
[daviddm-url]: https://david-dm.org/Danwakeem/generator-auth0-rules
[coveralls-image]: https://coveralls.io/repos/Danwakeem/generator-auth0-rules/badge.svg
[coveralls-url]: https://coveralls.io/r/Danwakeem/generator-auth0-rules