Creating an auth provider and I've had some success with login But now that I'm working on logoff I can't even seem to hit the breakpoint in the authentication provider I put together.
I see logoffHandler in web.config
<add name="LogoffHandler*" path="Logoff.aspx" verb="*" type="DotNetNuke.Services.Authentication.LogOffHandler, DotNetNuke" preCondition="integratedMode"/>
Not sure if it's related. Maybe I need to update the package to explicitly set my logoff as the logoff for the module?
install settings do have logoff control source set properly but that control is still not being hit on any breakpoint
Ok so searching the source I see a script that set ModuleControls to point logoff to:
DesktopModules/Admin/Authentication/Logoff.ascx
But having a setting in my .dnn file for the Authentication Module <logoffControlSrc>DesktopModules/myAuthmodule/Logoff.ascx</logoffControlSrc> Doesn't update that setting in ModuleControls I went into the DB to manually update it, I guess I need to create a sql script to do the update in the package, was hoping it would be set by the auth package definition. If I did something wrong let me know
OK so I'm back at this issue
Creating a modified authentication process realized I needed to tell UserAuthenticatedEventArgs my Authentication Type
var eventArgs = new UserAuthenticatedEventArgs(user, msIndividual.emailAddress, loginStatus, "myCustomAuth") But now when I try to logout it fails. I'm sure I'm missing something probably simple but the error I get back is
System.InvalidCastException: Unable to cast object of type 'ASP.desktopmodules_myCustomAuth_logoff_ascx' to type 'DotNetNuke.Services.Authentication.AuthenticationLogoffBase'.
Oh, wow... You've had quite the journey through this challenge. Sorry, I'm just now seeing this, but I was reading through this thinking you might be missing a class, and there it is. Thank you so much for also posting the solution! :)
In the future, we have a working template that we usually use for authentication providers, and is about to be released in the next major release of the Upendo DNN Generator. This will make it easier for you and others to get started in the future. Sorry it's of less help to you right now, though. :(
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:
Awesome! Simply post in the forums using the link below and we'll get you started.