Giter Club home page Giter Club logo

taiga-contrib-google-auth-x's Introduction

Taiga contrib google auth

A Taiga plugin for google oauth2 authentication (Ported from official gitlab auth).

Installation

Production env

Taiga Back

In your Taiga back python virtualenv install the pip package taiga-contrib-google-auth-x with:

   pip install git+https://github.com/er-tho/taiga-contrib-google-auth-x.git@master#egg=taiga-contrib-google-auth-x&subdirectory=back

Modify your settings/local.py and include the following lines:

    INSTALLED_APPS += ["taiga_contrib_google_auth_x"]

    # Get these from https://console.cloud.google.com/apis/credentials

    GOOGLE_API_CLIENT_ID = "YOUR_GOOGLE_API_CLIENT_ID"
    GOOGLE_API_CLIENT_SECRET = "YOUR_GOOGLE_API_CLIENT_SECRET"
    GOOGLE_API_REDIRECT_URI = "YOUR_GOOGLE_API_REDIRECT_URI"
    GOOGLE_RESTRICT_LOGIN = ["YOUR_DOMAIN_1","YOUR_DOMAIN_2"]

You can ommit GOOGLE_RESTRICT_LOGIN if unnecessary.

Taiga Front

Download in your dist/plugins/ directory of Taiga front the content of taiga-contrib-google-auth-x/front/dist:

  cd dist/
  mkdir -p plugins/google-auth
  cd plugins/google-auth
  (clone front/dist dir here)

Include in your dist/conf.json in the 'contribPlugins' list the value "/plugins/google-auth/google-auth.json":

...
    "googleClientId": "YOUR-GOOGLE-CLIENT-ID",
    "contribPlugins": [
        (...)
        "/plugins/google-auth/google-auth.json"
    ]
...

Dev env

Taiga Back

Clone the repo and

  cd taiga-contrib-google-auth-x
  workon taiga
  pip install -e .

Modify taiga-back/settings/local.py and include the lines:

    INSTALLED_APPS += ["taiga_contrib_google_auth_x"]

    # Get these from https://console.cloud.google.com/apis/credentials

    GOOGLE_API_CLIENT_ID = "YOUR_GOOGLE_API_CLIENT_ID"
    GOOGLE_API_CLIENT_SECRET = "YOUR_GOOGLE_API_CLIENT_SECRET"
    GOOGLE_API_REDIRECT_URI = "YOUR_GOOGLE_API_REDIRECT_URI"
    GOOGLE_RESTRICT_LOGIN = ["YOUR_DOMAIN_1","YOUR_DOMAIN_2"]

Taiga Front

After clone the repo link dist in taiga-front plugins directory:

  cd taiga-front/dist
  mkdir -p plugins
  cd plugins
  ln -s ../../../taiga-contrib-google-auth-x/front/dist google-auth

Include in your dist/conf.json in the 'contribPlugins' list the value "/plugins/google-auth/google-auth.json":

...
    "googleClientId": "YOUR-GOOGLE-CLIENT-ID",
    "contribPlugins": [
        (...)
        "/plugins/google-auth/google-auth.json"
    ]
...

In the plugin source dir taiga-contrib-google-auth-x/front run

npm install

and use:

  • gulp to regenerate the source and watch for changes.
  • gulp build to only regenerate the source.

Running tests

We only have backend tests, you have to add your taiga-back directory to the PYTHONPATH environment variable, and run py.test, for example:

  cd back
  add2virtualenv /home/taiga/taiga-back/
  py.test

taiga-contrib-google-auth-x's People

Contributors

donbowman avatar er-tho 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.