whythawk / full-stack-fastapi-postgresql

Full stack, modern web application generator. Using FastAPI, PostgreSQL as database, Nuxt3, Docker, automatic HTTPS and more.
MIT License
231 stars 47 forks source link

Login Failed #14

Closed FranzForstmayr closed 1 year ago

FranzForstmayr commented 1 year ago

When trying to login with my superuser credentials in my fresh build application I get an login error in tokens.ts/usTokenStore.getTokens().

The error is visible as toast in frontend, no error shown in docker-compose logs -f.

turukawa commented 1 year ago

Is your database running?

FranzForstmayr commented 1 year ago

At least the logs say so:

docker compose logs db

bs-fastapi-nuxt-db-1  | PostgreSQL Database directory appears to contain a database; Skipping initialization
bs-fastapi-nuxt-db-1  | 
bs-fastapi-nuxt-db-1  | 2023-02-22 20:22:40.385 UTC [1] LOG:  starting PostgreSQL 14.7 (Debian 14.7-1.pgdg110+1) on x86_64-pc-linux-gnu, compiled by gcc (Debian 10.2.1-6) 10.2.1 20210110, 64-bit
bs-fastapi-nuxt-db-1  | 2023-02-22 20:22:40.405 UTC [1] LOG:  listening on IPv4 address "0.0.0.0", port 5432
bs-fastapi-nuxt-db-1  | 2023-02-22 20:22:40.405 UTC [1] LOG:  listening on IPv6 address "::", port 5432
bs-fastapi-nuxt-db-1  | 2023-02-22 20:22:40.406 UTC [1] LOG:  listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
bs-fastapi-nuxt-db-1  | 2023-02-22 20:22:40.464 UTC [26] LOG:  database system was shut down at 2023-02-22 01:00:27 UTC
bs-fastapi-nuxt-db-1  | 2023-02-22 20:22:40.473 UTC [1] LOG:  database system is ready to accept connections
turukawa commented 1 year ago

Related to this maybe? https://github.com/whythawk/full-stack-fastapi-postgresql/issues/10

Very difficult to address these issues since I'm not able to replicate them, and I don't have enough experience to make a guess. Would be great if someone could review the docker-compose and see if there are holes there.

FranzForstmayr commented 1 year ago

Works with 0.7.1, don't know why :)