Installation and deployment Questions on installation, system configuration and deployment to the live server.
Version 5.x > Installation and deployment > Authentication Issues View modes: 
User avatar
Member
Member
amarwadi-gmail - 10/13/2010 2:51:03 PM
   
Authentication Issues
Hello,
We are deploying our homegrown site using Kentico CMS. Our site has its custom forms authentication that hits up against our database to validate a user's username/password. If all goes well, a new cookie is created for the User and the user gets authenticated well.

We're also allowing people i.e. Kentico Users login through the regular CMS Desk login. Herein lies the problem. When a Kentico User logs in to the CMS Desk and navigates to any of the pages on the CMS Desk, the site actually thinks an actual site user has logged on because the User.Identity.IsAuthenticated returns a TRUE (potentially).

Now my custom code thinks that since the user is authenticated, it needs to persist the user information and process the user's login. However, the logged in user is actually a Kentico CMS Desk user and not a site user causing this login processing to fail thereby blowing up the page.

My questions is:

How do we distinguish between a CMS Desk login and an actual Site login?

Any thoughts would be very helpful.

Cheerz,
Anup

User avatar
Kentico Developer
Kentico Developer
kentico_helenag - 10/14/2010 8:45:14 AM
   
RE:Authentication Issues
Hello Anup,

Do you use custom security handler or how do you handle the custom authentication?

You can distinguish between CMSDesk and Live site by ViewMode - it is a property of CMSContext class. Or do you need anything else?


Best regards,
Helena Grulichova