mongodb-labs/full-stack-fastapi-mongodb

Example stack: unable to login with "admin@example.com"and changethis pwd

Closed this issue · 4 comments

Hello,
I want to test the example stack, but cannot login with the admin@example.com and changethis password.

Am I missing something?

Hi @shouari, we had a couple of bug fixes this morning, can you please try again?

Hi, @shouari, we recently merged a PR #42 in response to another issue. We have strong reason to believe that this should resolve your issue as well. Can you confirm this by running the quickstart guide?

anh56 commented

hi, I have the same problem and cannot login via the FE's login page.
I found the error to be the response model of the /login route.

class Token(BaseModel):
    # access_token: SecretStr
    # refresh_token: SecretStr | None = None
    access_token: str
    refresh_token: str | None = None

if you use SecretStr the return token will be censored (as in *****), and FE cannot decode them.

Jibola commented

Hi @anh56 we recently merged #45 which targets this issue exactly. This should now resolve any further occurrence of this issue.