seqeralabs / nf-tower

Nextflow Tower system

Home Page:https://tower.nf

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Bad credentials on login

birnbera opened this issue · comments

I'm using a local deployment of nf-tower via docker compose and running into a strange authentication issue. I am able to generate tokens, receive the email notification with a login link, and see the database updating with the user and token. However when clicking on the link, I am unable to login and receive a warning that says "Bad credentials". Looking at the browser devtools console, it says "Authenticating with null, null". After some digging, it appears that the uid and token in the login link query string is not being inserted into the body of the authentication POST request as intended. The issue may be related to an underlying Angular bug. I am able to successfully login by manually constructing a POST request with the body containing a JSON block with the uid and token as username and password, respectively, as in:

curl -L -X POST -H 'Content-Type: application/json' http://localhost:8000/api/login -d '{"username":"P9r3YbqO","password":"af2bc5bd3cb54d8a1fee557e4f85028e8e96e3ed"}'

This returns me to http://localhost:8000/auth?success=true.

What is most surprising is that several months ago I was playing with nf-tower and did manage to get things working. I don't think anything substantial has changed with the frontend code in that time. I tried checking out older commits that would have corresponded to the timeframe where I got it working and I'm still seeing the same issue. I've also tried multiple browsers and operating systems, which all exhibit the same behavior.

Any idea what might be going on here?

Just figured out that building and serving the frontend from MacOS (still from Docker) works, but not from a Centos 7 instance. Not sure why that would be the case since it's all built in the same base image with the same image sha.