qgis / qwc2-demo-app

QWC2 demo application
Other
243 stars 155 forks source link

Issues setting db-auth service #378

Closed jblanchg closed 2 years ago

jblanchg commented 2 years ago

We've set up other services like qwc-config-db or qwc-elevation-service without any trouble, but when it comes to qwc-db-auth service, we can't seem to get it working.

We can acces the login form in http://localhost/auth/login, and if we try to acces with an inexistent user we get the corresponding error. But if we try to log in with admin user (the first time we were asked to change the password), it redirects to the main page but without being logged in. We can still see the Login button, not the Logout one. login_err1

Even the value from last_sign-in_at column from qwc2_config.users updates, but still we can't log in. login_err2

We have the service running in a virtual enviroment, with all the requirements listed in requirements.txt installed and with dbAuthConfig.json set as seen in the documentation.

Do you have any idea of what might be happening? Something we did wrong, or missed?

Thank you!

manisandro commented 2 years ago

Are you also using the qwc-map-viewer?

jblanchg commented 2 years ago

Originally not, we tried setting it up, without any changes regarding qwc-db-auth behaviour. Currently we are not using it either.

manisandro commented 2 years ago

You do need qwc-map-viewer for qwc-db-auth to work. Generally I recommend you start with qwc-docker as a working initial configuration and then customize it as desired.

jblanchg commented 2 years ago

We've finally got it working, apparently the acces_token_cookie was not generating correctly because we didn't have any JWT_SECRET_KEY