Git Product home page Git Product logo

github-source-control-integration's Introduction

GitHub Source Control Integration

Under Extensions you'll find the GitHub Deploy extension which allows you to manage your Datbase Connections and Rules in a GitHub repository.

Deploying Pages

For Hosted Pages you'll created an html file and a json file (for enabled/disabled status) under pages. Supported hosted pages:

error_page
guardian_multifactor
login
password_reset

Deploying Database Connection Scripts

For Database Connections you create a directory under database-connections which contains the name of your Database Connection (in exactly the same way as you named it in Auth0). And under this directory you'll create 1 file for every script you want to use. Only the login script is required in a Custom Database connection. If you enabled the migration feature, you'll also need to provide the get_user script.

Allowed scripts:

get_user.js
create.js
verify.js
login.js
change_password.js
delete.js

An example can be found here.

Deploying Rules

For rules you'll create 1 JavasSript file for every rule you want to deploy under the rules directory. Eg: rules/set-country.js.

When creating the rule the name in Auth0 will be set to set-country. If you plan to use Source Control integration for an existing account, make sure you rename your rules in Auth0 first to the same name of the files you'll deploy to this directory.

In addition to that you might want to control the rule order, status (enabled/disabled) and stage (login_success, login_failure, user_registration).

These can be controlled by creating a JSON file next to your Javascript file. Eg:

set-country.js

function (user, context, callback) {
	if (context.request.geoip) {
		user.country = context.request.geoip.country_name;
	}

	callback(null, user, context);
}

set-country.json

{
  "enabled": false,
  "order": 15,
  "stage": "login_success"
}

Note:

  • Having multiple rules with the same order is not allowed. Make sure you don't have any collisions.

A few examples can be found here.

github-source-control-integration's People

Contributors

arcseldon avatar sandrinodimattia 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.