DNN Forums

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

Password Reset controls

 5 Replies
 0 Subscribed to this topic
 40 Subscribed to this forum
Sort:
Author
Messages
New Around Here
Posts: 10
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
Posts: 360
Veteran Member
Helpful Replier
Helpful Replier
Thanks for being such a helpful replier!
MVP
MVP
You're an MVP!
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
Posts: 10
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:

    
        
            CustomAuthSystem
            DesktopModules/AuthenticationProvider/Settings.ascx
            DesktopModules/AuthenticationProvider/Login.ascx
        

    

    
        
            AuthenticationProvider
            AuthenticationProvider
            Modules.AuthenticationProvider.Components.FeatureController
            
            
                
                    AuthenticationProvider
                    0
                    
                        
                            SendPasswordCustom
                            DesktopModules/AuthenticationProvider/SendPassword.ascx
                            False
                            Send Password Custom
                            Anonymous
                            
                            
                            True
                        

                    

                

            

        

    

Senior Member
Posts: 1607
Senior Member
MVP
MVP
You're an MVP!
New Poster
New Poster
Congrats on posting!

Hello:

I'm not sure about the real fix, at the moment, but the <code>NavigateURL()</code> 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 <code>Anonymous</code> to <code>View</code>.  

Example:  <code><controlType>View</controlType></code>

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
Posts: 10
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?

Senior Member
Posts: 1607
Senior Member
MVP
MVP
You're an MVP!
New Poster
New Poster
Congrats on posting!

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.  

These Forums are for the discussion of the open source CMS DNN platform and ecosystem.

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