The Taiga plugin for google authentication.
In your Taiga back python virtualenv install the pip package taiga-contrib-google-auth2 with:
pip install taiga-contrib-google-auth2Modify your settings/local.py and include the line:
INSTALLED_APPS += ["taiga_contrib_google_auth"]
# Get these from https://console.cloud.google.com/apis/credentials
CLIENT_ID = "GOOGLE_API_CLIENT_ID"
CLIENT_SECRET = "GOOGLE_API_CLIENT_SECRET"
REDIRECT_URI = "GOOGLE_API_REDIRECT_URI"
RESTRICT_LOGIN = ["GOOGLE_RESTRICT_LOGIN"]
ALLOW_DOMAIN = ["GOOGLE_API_ALLOW_DOMAIN"]Download in your dist/plugins/ directory of Taiga front the taiga-contrib-google-auth2 compiled code (you need subversion in your system):
cd dist/
mkdir -p plugins
cd plugins
svn export "https://github.com/seyriz/taiga-contrib-google-auth/tags/$(pip show taiga-contrib-google-auth2 | awk '/^Version: /{print $2}')/front/dist" "google-auth"Include in your dist/conf.json in the 'contribPlugins' list the value "/plugins/google-auth/google-auth.json":
...
"googleClientId": "GOOGLE_API_CLIENT_ID",
"contribPlugins": [
(...)
"/plugins/google-auth/google-auth.json"
]
...Clone the repo and
cd taiga-contrib-google-auth2/back
workon taiga
pip install -e .Modify taiga-back/settings/local.py and include the line:
INSTALLED_APPS += ["taiga_contrib_google_auth"]
# Get these from https://console.cloud.google.com/apis/credentials
CLIENT_ID = "GOOGLE_API_CLIENT_ID"
CLIENT_SECRET = "GOOGLE_API_CLIENT_SECRET"
REDIRECT_URI = "GOOGLE_API_REDIRECT_URI"
RESTRICT_LOGIN = "GOOGLE_RESTRICT_LOGIN"
ALLOW_DOMAIN = "GOOGLE_API_ALLOW_DOMAIN"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-auth2/dist google-authInclude in your dist/conf.json in the 'contribPlugins' list the value "/plugins/google-auth/google-auth.json":
...
"googleClientId": "GOOGLE_API_CLIENT_ID",
"contribPlugins": [
(...)
"/plugins/google-auth/google-auth.json"
]
...In the plugin source dir taiga-contrib-google-auth2/front run
npm installand use:
gulpto regenerate the source and watch for changes.gulp buildto only regenerate the source.
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