Hi,
I am new to portals. I am trying to setup authentication for portal only for contacts. I have enabled the site settings for authentication but my portal still not prompting for the login instead it directly goes to the home page without requiring for login. The portal is anonymous. How to enable the login authentication? Please help.
Thanks.
Thanks for helping.
Thank you Zbird94. Let me try and get back to you of needed. Thanks a lot.
Hi @alwaysjai,
Correct me if I'm interpreting wrongly, but you'd like to force anonymous users to the sign-in page?
You can create, a Web Page Access Control Rule, and call it e.g. 'Unauthenticated Users restriction'. From there, select Home as the Web Page, the correct Website, and the Right of Restrict Read. Also, the Scope as 'Exclude Direct Child Web Files', this will ensure your CSS still loads on the page. As Home is the main page, all child pages will inherit this Control Rule. This should do the job.
In addition, to force users not signed in to your sign-in page, you can create a new Web Template e.g. 'Home Redirect' and add this code:
{% if user %}
{% else %}
<script>
window.location.replace('/SignIn?ReturnUrl=/');
</script>
{% endif %}
Then, save this Web template and include it in your Home Web Template, by adding the line:
{% include "Home Redirect" %}
A combination of these two suggestions, will effectively bulletproof your portal from anonymous users, I believe.
Ok thank you for the reply. I will make this change and try
see if the above configuration solves the problem, just so we know.. what happens if you force on the browser the portals URL + /SignIn ... does this get redirected to the home page, is that the case?
Hi @alwaysjai :
You can set these web pages' visibility by setting the Permissions property of them.
I think this link will help you a lot:
Best Regards,
Bof
Lucas001
60
Super User 2025 Season 2
Fubar
55
Super User 2025 Season 2
surya narayanan
35