Skip to content

Add hooks to allow authentication page customization #722

@eric-michel

Description

@eric-michel

Is your enhancement related to a problem? Please describe.

I'm working on an enhancement plugin for Two Factor that adds cookies to bypass 2FA for saved devices. I need to add a checkbox to the authentication form like so:

Image

I'm currently having to do this via JavaScript, because there are no hooks to customize the form in the various authentication_page functions to allow for form customization.

Proposed Solution

A hook added to the authentication_page functions that allows for form fields to be added would solve this problem. Ideally, it would be a single hook that allows for the addition of fields to all of the authentication forms in one go, but would include an argument in the function to conditionally add fields to specific forms if needed (e.g. only adding a field to totp authentication).

Designs

No response

Describe alternatives you've considered

No response

Please confirm that you have searched existing issues in this repository.

Yes

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions