lasconic / finary_uapi

MIT License
38 stars 11 forks source link

Can't signing anymore ? #177

Closed nmathey closed 8 months ago

nmathey commented 8 months ago

Hi,

Someone reported me this issue that I'm also able to reproduce.

abc@82ddd3721216:~/workspace/finary_uapi$ python -m finary_uapi signin
Traceback (most recent call last):
  File "/usr/lib/python3.10/runpy.py", line 196, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/usr/lib/python3.10/runpy.py", line 86, in _run_code
    exec(code, run_globals)
  File "/config/workspace/finary_uapi/finary_uapi/__main__.py", line 452, in <module>
    sys.exit(main())
  File "/config/workspace/finary_uapi/finary_uapi/__main__.py", line 155, in main
    result = signin(args["MFA_CODE"])
  File "/config/workspace/finary_uapi/finary_uapi/signin.py", line 50, in signin
    if xjson["response"]["status"] == "complete":
KeyError: 'response'
abc@82ddd3721216:~/workspace/finary_uapi$ 
lasconic commented 8 months ago

I'll have a look asap.

lasconic commented 8 months ago

Mmm I can't reproduce. Do you have MFA on ?

nmathey commented 8 months ago

Yes I think I enabled it just recently. I'm gonna try to remove it if you want.

Le mer. 21 févr. 2024 à 20:42, Nicolas Froment @.***> a écrit :

Mmm I can't reproduce. Do you have MFA on ?

— Reply to this email directly, view it on GitHub https://github.com/lasconic/finary_uapi/issues/177#issuecomment-1956254690, or unsubscribe https://github.com/notifications/unsubscribe-auth/AE7NT2HJ6S4MMBZJ4FHA7ELYUW6P3AVCNFSM6AAAAABDSUFDHKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSNJWGI2TINRZGA . You are receiving this because you authored the thread.Message ID: @.***>

lasconic commented 8 months ago

Ok I'll add it and test.

lasconic commented 8 months ago

It works with 2FA as well. The code assumes it works. I could add more information if the second call with the 2fa code is not successful. Let me know if you find the root cause.

nmathey commented 8 months ago

Deactivating 2FA makes it work again. Can you try activating it and try again signin 24h+ later (I don't how caching work)?

nmathey commented 8 months ago

Got multiple feedback with the same issue from different users. You still not able to reproduce it?

EDIT: Issue looks random, got one user with the same error without 2FA activated :(

nmathey commented 8 months ago

FYI: https://community.finary.com/t/mise-en-place-obligatoire-du-2fa/12549

lasconic commented 8 months ago

I'm sorry I can't reproduce. I have 2FA on in finary. I open Google Auth on my phone, run "signin MFA_CODE" where MFA_CODe is the code I read on my app and it works, I'm signed in.

The error message you see is exactly the one I get if I sign in with 2Fa activated by without the 2FA code passed to signin. Are your users aware that they need to pass the 2FA code when they sign in ?

nmathey commented 8 months ago

I think Finary is starting forcing 2FA usage for somme user without updating the end user configuration as it deactivated on front-end but some users still experiencing the issue. While activating the 2FA and passing the generated code through seems to work.

I have one user still having the issue but I'll ask him to force update dependencies to make sure it is not something else. He is not on github so trying to help him as much as I could.

nmathey commented 8 months ago

I guess we can close this issue ;) I was able to reproduce it anymore since I forced using 2FA due that I use Crypto Finary services.