+ Start a Discussion
krishna p 28krishna p 28 

communities authentication to custom pages

I am using communities and sites together. I have customized login process.  I have few custom vf pages associated with community. I have added these vf pages under site as well. When I try to access any page directly by typing the community url + page name it is accessible. Is there any way to avoid this. If some one tries to access any custom page directly(.....like communityurl/custompagename), this should check for user log in. If user is not logged in, should be redirected to login page.

Amit Chaudhary 8Amit Chaudhary 8
Please check below post. I hope that will help you to create session in community

If we need to login in salesforce community then we can use below function :-
Site.login(username, password, null);

Please let us know if this will help u