robrotheram / taiga-contrib-openid-auth

Taiga plugin for openid authentication
45 stars 25 forks source link

Invalid login type #21

Closed Rinma closed 3 years ago

Rinma commented 3 years ago

Hi,

When I try to login in taiga, my browser returns

POST https://<taiga-server>/api/v1/auth: 400
{"_error_message": "invalid login type", "_error_type": "taiga.base.exceptions.BadRequest"}

And on the Taiga login page, a red message appears with the message "Oops, something went wrong... invalid login type"

I configured the frontend and backend container with a connection like this:

ENABLE_OPENID: "true"
OPENID_URL: "https://<keycloak-server>/auth/realms/<keycloak-realm>/protocol/openid-connect/auth"
OPENID_USER_URL: "https://<keycloak-server>/auth/realms/<keycloak-realm>/protocol/openid-connect/userinfo"
OPENID_TOKEN_URL: "https://<keycloak-server>/auth/realms/<keycloak-realm>/protocol/openid-connect/token"
OPENID_CLIENT_ID: "<client-id>"
OPENID_CLIENT_SECRET: "<client-secret>"
OPENID_NAME: "SSO"
OPENID_SCOPE: "openid email"

Any ideas what it could be or hints what I should check?

robrotheram commented 3 years ago

The error suggests that the plugin did not install correctly. I would check the response to https://taiga-server/conf.json and I would check to see what the backend config is not been overwritten by a volume mount. This config lives in "/taiga-back/settings/config.py" in the container you can see what the contianer sees by running:

docker exec -it name-of-taiga-back-container bash 
less /taiga-back/settings/config.py
Rinma commented 3 years ago

So, after looking at /taiga-back/settings/config.py I changed ENABLE_OPENID: "true" to ENABLE_OPENID: "True" for the backend and now it works.

Thank you much for the help.