DNN Forums

Ask questions about your website to get help learning DNN and help resolve issues.

Password Reset controls

Sort:
You are not authorized to post a reply.





New Around Here





    Hi there,

    We are working with a DNN 9.9.1 installation and are currently writing our own custom Authentication Provider. It now completely works for users that want to login, but we're currently investigating how to implement a custom SendPassword & PasswordReset page. In default DNN, the controls in the "admin/Security" folder are used. However we want to write our own controls. 

    Is there anybody that could inform us whether how to implement a custom SendPassword/PasswordReset page and redirect to those page in the password reset url. Or if there is any documentation about this? 






    Veteran Member





      Within your custom login control, you can just implement a "Forgot Password" link and redirect the user to your own custom SendPassword control, similar to this - https://github.com/dnnsof.../Login.ascx.cs#L109. Then for your custom SendPassword control, you would need to implement the desired custom logic similar to this - https://github.com/dnnsof...endPassword.ascx.cs.

      David Poindexter


      Creator:







      New Around Here





        Hi David, thanks for your answer!

        We've already created a custom Authentication Provider, and we've just added the SendPassword.ascx classes for a custom SendPassword control to our solution.
        However, if we try to navigate to our custom SendPassword control like:
        url = this.navigationManager.NavigateURL("SendPasswordCustom", "returnurl=" + returnUrl);

        Unfortunately, the custom SendPassword control doesn't render.
        Is there something we've forgot to setup for this to work? Or do we have to declare our custom SendPassword control differently?

        The components in our dnn file are declared like this:
        <components>
            <component type="AuthenticationSystem">
                <authenticationService>
                    <type>CustomAuthSystem</type>
                    <settingsControlSrc>DesktopModules/AuthenticationProvider/Settings.ascx</settingsControlSrc>
                    <loginControlSrc>DesktopModules/AuthenticationProvider/Login.ascx</loginControlSrc>
                </authenticationService>
            </component>
            <component type="Module">
                <desktopModule>
                    <moduleName>AuthenticationProvider</moduleName>
                    <folderName>AuthenticationProvider</folderName>
                    <businessControllerClass>Modules.AuthenticationProvider.Components.FeatureController</businessControllerClass>
                    <supportFeatures />
                    <moduleDefinitions>
                        <moduleDefinition>
                            <friendlyName>AuthenticationProvider</friendlyName>
                            <defaultCacheTime>0</defaultCacheTime>
                            <moduleControls>
                                <moduleControl>
                                    <controlKey>SendPasswordCustom</controlKey>
                                    <controlSrc>DesktopModules/AuthenticationProvider/SendPassword.ascx</controlSrc>
                                    <supportsPartialRendering>False</supportsPartialRendering>
                                    <controlTitle>Send Password Custom</controlTitle>
                                    <controlType>Anonymous</controlType>
                                    <iconFile />
                                    <helpUrl />
                                    <supportsPopUps>True</supportsPopUps>
                                </moduleControl>
                            </moduleControls>
                        </moduleDefinition>
                    </moduleDefinitions>
                </desktopModule>
            </component>
        </components>






        Veteran Member





          Hello:

          I'm not sure about the real fix, at the moment, but the NavigateURL() method is designed to navigate someone to a view control.  Therefore, in a traditional module, you'd want to update the DNN manifest to switch Anonymous to View.  

          Example:  <controlType>View</controlType>

          But, you're creating an authentication system, so your control list should look more like this example.  (Note that it's not a module component.) 






          New Around Here





            Hi Will, thanks for the suggestion. As you can see in my previous post, we already have declared our Login.ascx file as a loginControlSrc.
            If we want to create our custom PasswordReset.ascx and SendPassword.ascx pages, does that mean they should be included in a module? Instead of a package of the type: AuthenticationSystem?






            Veteran Member





              Technically, as long as your custom authentication controls correctly navigate to and from the password reset control, you should be fine.  This is regardless of how it's implemented.  

              You are not authorized to post a reply.

              These Forums are dedicated to the discussion of DNN Platform.

              For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

              1. If you have (suspected) security issues, please DO NOT post them in the forums but instead follow the official DNN security policy
              2. No Advertising. This includes the promotion of commercial and non-commercial products or services which are not directly related to DNN.
              3. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
              4. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
              5. No Flaming or Trolling.
              6. No Profanity, Racism, or Prejudice.
              7. Site Moderators have the final word on approving / removing a thread or post or comment.
              8. English language posting only, please.

              Would you like to help us?

              Awesome! Simply post in the forums using the link below and we'll get you started.

              Get Involved