We are using a custom Backoffice OWIN provider to authenticate our users against our local Active Directory. However, since switching to this new method a few versions ago the Preview feature no longer works. I can see in the .config file in the \Umbraco\App_Data\Preview folder that the changes exist in the XML. However, the preview window still shows the old content. I believe this has to do with some sort of permissions issue for the user since we are doing our own authentication. Is there something else I need to set during the authentication to get the preview function working again?
I have confirmed that this is in fact due to our custom owin:appStartup code. When I setup a test install of Umbraco to point to our same backend database, but use the default UmbracoDefaultOwinStartup value, I can preview just fine. This must have to do with the way the preview detects the currently-logged-in user to show them the preview. I must be missing something in my custom owin code that needs to be set for the session to indicate who the current user is. Any ideas what needs to be set for this? Are you using something in User.Identity, or some session variable?
After a day of troubleshooting I think I've answered my own question. In the public void Configuration(IAppBuilder app) function where I specify my IBackOfficeUserPasswordChecker password checker function, I needed to first set the following app options:
Preview with Custom Backoffice Authentication
We are using a custom Backoffice OWIN provider to authenticate our users against our local Active Directory. However, since switching to this new method a few versions ago the Preview feature no longer works. I can see in the .config file in the \Umbraco\App_Data\Preview folder that the changes exist in the XML. However, the preview window still shows the old content. I believe this has to do with some sort of permissions issue for the user since we are doing our own authentication. Is there something else I need to set during the authentication to get the preview function working again?
I have confirmed that this is in fact due to our custom owin:appStartup code. When I setup a test install of Umbraco to point to our same backend database, but use the default UmbracoDefaultOwinStartup value, I can preview just fine. This must have to do with the way the preview detects the currently-logged-in user to show them the preview. I must be missing something in my custom owin code that needs to be set for the session to indicate who the current user is. Any ideas what needs to be set for this? Are you using something in User.Identity, or some session variable?
After a day of troubleshooting I think I've answered my own question. In the public void Configuration(IAppBuilder app) function where I specify my IBackOfficeUserPasswordChecker password checker function, I needed to first set the following app options:
All the examples I had seen omitted the last option, which prevented the preview from working.
is working on a reply...