Jeoxs / khanos

A Flutter Android Client for Kanboard
MIT License
51 stars 10 forks source link

Impossible to log in (using also LDAP as authentication) aligned to issue #23 #33

Open arminwedler opened 1 year ago

arminwedler commented 1 year ago

I also have a problem with logging in via Android apps, and I can summarize it here with these key facts.

I have well-connected Kanboard to my locally running openLDAP server. I can log in via Web browser from any device, including my local PC and also my Android phone (Web browser - FF). I can login with LDAP users and with local users (e.g. Admin). Using via browser: "https://server-adress.de/kanban/?controller=AuthController&action=login" Now the strange situation comes, when logging in from my android device using your Khanos app (unfortunately same behavior with the F-Droid Kandroid app). If I use this address, "https://server-adress.de/kanban/?controller=AuthController&action=login" this error occurs: grafik If I use this adress, "https://server-adress.de/kanban/" this error ocures: grafik

I tried it with the LDAP user but also the local admin. I tried it with the LDAP Users psw. but also with the users API code as psw. Could you please confirm the right definition of the Login Adress (URL). And maybe help me with, what could I try to change in the KanBoard config.php file, to solve this login problem. Any help is appreciated! Best

Armin

arminwedler commented 1 year ago

Hello, I have investigated a bit in the login problem, and it seems to me that, khanos is not correctly transporting the username for authentication. Looking in the log file of the Kanboard this occurs for LDAP authentication: [2022-11-05 18:42:11] [error] API authentication failure for [2022-11-05 18:42:11] [info] User () not found in LDAP server And if I disable LDAP authentication and use a local user, this is logged: [2022-11-05 18:48:43] [error] API authentication failure for

It might also be related to my server configurations... Any help is likely appreciated

arminwedler commented 1 year ago

Log File from the Kanboard with local user Login try [2022-11-06 04:59:01] [debug] Subscriber executed: Kanboard\Subscriber\BootstrapSubscriber::execute [2022-11-05 21:59:01] [debug] Subscriber executed: Kanboard\Subscriber\AuthSubscriber::onLoginFailure [2022-11-05 21:59:01] [error] API authentication failure for [2022-11-05 21:59:01] [debug] SQL: SELECT option, value FROM settings [2022-11-05 21:59:01] [debug] SQL: query_duration=0.000424861907959 [2022-11-05 21:59:01] [debug] SQL: total_execution_time=0.000424861907959 [2022-11-05 21:59:01] [debug] SQL: SELECT FROM actions [2022-11-05 21:59:01] [debug] SQL: query_duration=0.000410079956055 [2022-11-05 21:59:01] [debug] SQL: total_execution_time=0.000834941864014 [2022-11-05 21:59:01] [debug] SQL: SELECT FROM action_has_params [2022-11-05 21:59:01] [debug] SQL: query_duration=0.000365018844604 [2022-11-05 21:59:01] [debug] SQL: total_execution_time=0.00119996070862 [2022-11-05 21:59:01] [debug] SQL: SELECT 1 FROM users WHERE username = ? AND lock_expiration_date != ? AND lock_expiration_date >= ? [2022-11-05 21:59:01] [debug] SQL: query_duration=0.000475883483887 [2022-11-05 21:59:01] [debug] SQL: total_execution_time=0.0016758441925 [2022-11-05 21:59:01] [debug] SQL: SELECT 1 FROM users WHERE username = ? AND is_active = ? AND twofactor_activated = ? [2022-11-05 21:59:01] [debug] SQL: query_duration=0.000448226928711 [2022-11-05 21:59:01] [debug] SQL: total_execution_time=0.00212407112122 [2022-11-05 21:59:01] [debug] SQL: SELECT id, password FROM users WHERE username = ? AND disable_login_form = ? AND is_ldap_user = ? AND is_active = ? LIMIT 1 [2022-11-05 21:59:01] [debug] SQL: query_duration=0.000466108322144 [2022-11-05 21:59:01] [debug] SQL: total_execution_time=0.00259017944336 [2022-11-05 21:59:01] [debug] SQL: SELECT id, password FROM users WHERE username = ? AND api_access_token = ? AND api_access_token IS NOT NULL AND is_active = ? LIMIT 1 [2022-11-05 21:59:01] [debug] SQL: query_duration=0.000490188598633 [2022-11-05 21:59:01] [debug] SQL: total_execution_time=0.00308036804199 [2022-11-05 21:59:01] [debug] APP: nb_queries=7 [2022-11-05 21:59:01] [debug] APP: rendering_time=0.0570778846741 [2022-11-05 21:59:01] [debug] APP: memory_usage=1.58M [2022-11-05 21:59:01] [debug] APP: uri=/kanban//jsonrpc.php [2022-11-05 21:59:01] [debug] ###############################################