[X] I have used the search tool and did not find an issue describing my bug.
Version information
5.4.2
Expected behavior
When an Agate user with access to Mica makes a request to the Mica API (using Python client), and the 2FA configuration is enabled (Authenticator app or code sent by email), when using the --otp parameter it is expected to receive the 2FA code by email and then type it into the command line so that the API validates access.
Actual behavior
When executing the API call, the user only receives the email with the 2FA code if the --otp parameter is not passed. If the user pass the --otp parameter, the prompt requests the 2FA code without sending the email.
And when the email is sent, it is sent 3 times:
Agate logs:
2024-08-14T20:58:38.114Z INFO 20 --- [p1899272141-183] o.o.a.web.rest.ticket.TicketsResource : Successful login for user 'user' from application 'mica'
2024-08-14T20:58:38.187Z INFO 20 --- [p1899272141-183] o.o.a.web.rest.ticket.TicketsResource : Successful login for user 'user' from application 'mica'
2024-08-14T20:58:38.232Z INFO 20 --- [p1899272141-183] o.o.a.web.rest.ticket.TicketsResource : Successful login for user 'user' from application 'mica'
And when using the --otp parameter, any code entered is accepted and the request is processed.
For example, I randomly typed 23 and the request was processed:
This issue is unique
Version information
5.4.2
Expected behavior
When an Agate user with access to Mica makes a request to the Mica API (using Python client), and the 2FA configuration is enabled (Authenticator app or code sent by email), when using the
--otp
parameter it is expected to receive the 2FA code by email and then type it into the command line so that the API validates access.Actual behavior
When executing the API call, the user only receives the email with the 2FA code if the
--otp
parameter is not passed. If the user pass the--otp
parameter, the prompt requests the 2FA code without sending the email.And when the email is sent, it is sent 3 times:
Agate logs:
Mica logs:
And when using the
--otp
parameter, any code entered is accepted and the request is processed.For example, I randomly typed
23
and the request was processed:Thanks in advance!
Reproduction steps
As described in the Actual behavior...
Operating System (OS)
Linux
Browser
Google Chrome
Contact info