joaovitoriasilva / endurain

Endurain is a self-hosted fitness tracking service designed to give users full control over their data and hosting environment
https://docs.endurain.com/
GNU General Public License v3.0
663 stars 15 forks source link

Unable to login #6

Closed DavidHenryThoreau closed 10 months ago

DavidHenryThoreau commented 10 months ago

I've deploy your docker-compose.yml

docker logs backend  -f
INFO:     Finished server process [1]
Admin user created successfully.
INFO:     Started server process [1]
INFO:     Waiting for application startup.
INFO:     Application startup complete.
INFO:     Uvicorn running on http://0.0.0.0:80 (Press CTRL+C to quit)

got to http://IP:8080 and can't login with as described in copy and paste admin:admin Unable to login. Check username and password (1).

Also tried to change password :

root@debian-12:/data/config# docker exec -it mariadb /bin/bash
root@7f6da50d822d:/# mariadb -uroot -p
Enter password:
Welcome to the MariaDB monitor.  Commands end with ; or \g.
Your MariaDB connection id is 4
Server version: 11.2.2-MariaDB-1:11.2.2+maria~ubu2204 mariadb.org binary distribution

Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

MariaDB [(none)]> use endurain;
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Database changed
MariaDB [endurain]> select * from users;
+----+---------------+----------+-------------------+------------------------------------------------------------------+------+-----------+--------------------+--------+-------------+------------+----------------+-----------+--------------+--------------+----------------------+-------------------------+
| id | name          | username | email             | password                                                         | city | birthdate | preferred_language | gender | access_type | photo_path | photo_path_aux | is_active | strava_state | strava_token | strava_refresh_token | strava_token_expires_at |
+----+---------------+----------+-------------------+------------------------------------------------------------------+------+-----------+--------------------+--------+-------------+------------+----------------+-----------+--------------+--------------+----------------------+-------------------------+
|  1 | Administrator | admin    | admin@example.com | 8c6976e5b5410415bde908bd4dee15dfb167a9c873fc4bb8a81f6f2ab448a918 | NULL | NULL      | en                 |      1 |           2 | NULL       | NULL           |         1 | NULL         | NULL         | NULL                 | NULL                    |
+----+---------------+----------+-------------------+------------------------------------------------------------------+------+-----------+--------------------+--------+-------------+------------+----------------+-----------+--------------+--------------+----------------------+-------------------------+
1 row in set (0.000 sec)

MariaDB [endurain]> update users set password='' where id =1 ;
Query OK, 1 row affected (0.123 sec)
Rows matched: 1  Changed: 1  Warnings: 0

Logs from frontend code is 200

- [31/Jan/2024:10:53:25 +0100] "POST /login.php HTTP/1.1" 200 2714 "http://192.168.122.141:8080/login.php"
DavidHenryThoreau commented 10 months ago

Change

BACKEND_HOST=backend 

instead of

BACKEND_HOST= api_host
joaovitoriasilva commented 10 months ago

Thanks. I will change the default value so this won't happen in the future