kanboard / plugin-oauth2

Generic OAuth2 authentication plugin
MIT License
25 stars 32 forks source link

External authentication failed #40

Open Electromaster232 opened 1 year ago

Electromaster232 commented 1 year ago

Actual behaviour

Error shown "External authentication failed"

Expected behaviour

User is logged in

Steps to reproduce

OAuth2 is configured with our corporate IdP, Authentik. All that is needed to trigger the error is to configure the provider and then attempt to login. No other information is provided besides the error and I am unsure how to debug this issue.

Configuration

Attached you will find logs with debug mode activated kanboardlogs.txt

uniqueNullptr2 commented 8 months ago

Also getting this error although I have different logs Using keycloak I get the error message Warning: Trying to access array offset on null in /var/www/app/app/Core/User/UserProfile.php on line 56 when trying to log in

I also have the following in my kanboard logs

PHP message: PHP Warning:  Trying to access array offset on null in /var/www/app/app/Core/User/UserProfile.php on line 56"
PHP message: Kanboard: user Unknown authentication failure with IP address: <IP address>"
2023/12/21 19:16:55 [error] 15#15: *201 FastCGI sent in stderr: "PHP message: PHP Warning:  Trying to access array offset on null in /var/www/app/app/Core/User/UserProfile.php on line 56; PHP message: Kanboard: user Unknown authentication failure with IP address: 185.209.196.228" while reading response header from upstream, client: 172.18.0.1, server: localhost, request: "GET /oauth/callback?state=<token> HTTP/1.1", upstream: "fastcgi://unix:/var/run/php-fpm.sock:", host: "<mydomain>"

I looked at the code and this seems to be related to LDAP group sync. I tried setting LDAP_GROUP_SYNC to false but the error stil lhappens

I have no group key and group filter configured in the oauth settings

Trapulo commented 5 months ago

I have the same problem and error authenticating with EntraID

Trapulo commented 5 months ago

I solved fixing user API url as "https://graph.microsoft.com/v1.0/me", not as described in plugin's doc