Describe the bug
When a user is trying to authenticate, the token sent may expire before they have a chance to complete login.
The usual way to address this is provide a button so they can request another token to be sent.
According to the documentation https://django-trench.readthedocs.io/en/latest/endpoints.html#send-the-code
Posting to /code/request:
Triggers sending out a code. If no method specified in the payload user’s primary MFA method will be used.
However, the view class for that:
class MFAMethodRequestCodeView(APIView):
permission_classes = (IsAuthenticated,)
Meaning you must already be authenticated before you can ask for the code to allow you to authenticate.
All other views in views/base.py are also marked with similar permissions, besides the MFAStepMixin which is marked as AllowAny.