Skip to content

Allow backends to pass extra context in Step 1 #215

Description

@funkybob

Is your feature request related to a problem? Please describe.
As in many MFA workflows, we wanted to show a masked phone number / email on the front end to indicate to the user which device the code had been sent to.

Describe the solution you'd like
Add a hook method to MFAFirstStepMixin to allow customising the content returned, akin to View.get_context_data

Pass in the default content, along with the response from dispatch_message, and perhaps the source_field to provide extra available details.

Describe alternatives you've considered
Alternatively:

  1. mask the source field and pass that in the response

  2. It appears currently that dispatch_message already returns a value, but it's not used by MFAFirstStepMixin
    This could offer a mechanism for a backend to choose what to show.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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