Skip to content

How can a user logging in request re-sending of their auth code? #217

@funkybob

Description

@funkybob

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions