Open Vindfrisk opened 3 years ago
Thanks for the issue report @Vindfrisk. Yes, I'll keep this issue open and will take any PR's that make this work. I would think this module should disable any functionality of 2FA no matter where it is.
@markshust @Vindfrisk do you guyz have any luck with it ? If not then i can create the patch and submit PR for it ?
Just left a comment on the commit that just came in a few hours ago. Once I can test this and verify code is working, I can bring this in.
We are having the same issue. Any update on this?
Hi @simonmaass -- this is my first day back from a little break. I'll be spending the next couple weeks on open source stuff, so will be testing this out and merging it in shortly (hopefully within the next few hours).
Issue confirmed on 2.4.1. Testing out PR/commit.
Merged this PR, and also made some styling/coding updates on the other files to keep things consistent with the coding recommendations I made. Tagged as version 1.1.0.
@markshust thank you for the fast implementation!
@markshust If I try to enable it for the API i get the following error:
Got the same error, but just putting twofactorauth/general/enable_for_api_token_generation
with value 0
into core_config_data
seems to work.
Thanks for this report & info @royduin -- I'll re-open this ticket so we can fix this.
Whoah - this ticket has been sitting here for a while 😅
I really don't want to disable 2FA for API token generation by default, as I think it should be retained enabled for security purposes.
But it appears this error is occurring only when "Enable 2FA" is set to No, and "Enable 2FA for API Token Generation" is set to Yes. Is this correct?
If so, what do you think would be the best way to handle this situation?
But it appears this error is occurring only when "Enable 2FA" is set to No, and "Enable 2FA for API Token Generation" is set to Yes. Is this correct?
This is indeed what happens, for anyone who wants to work around it for the time being, you can do it via the CLI:
bin/magento config:set twofactorauth/general/enable_for_api_token_generation 0
Not sure if you intended to also patch this? Anyhow you cant create REST tokens because of 2fa limitation. See response below.