Creating simple login functionality to protect access to site
I need to protect access to my site via a login. This means all pages, including the root should be protected and redirect to a login page. I've used the macro partial view snippet to create a login view and inserted it onto a template, but I don't know how to make the page redirect after a successful login.
When I try to set up public access on my content nodes it also asks for an error page, but I saw no snippet for that. Is this necessary, and if so, what needs to be on that page?
I've followed all the videos on Umbraco TV for the member API, but he doesn't explain or show all the code, so I'm stuck in that regard.
No, I am having a different problem. When I go to any of the pages which have the public access specified to a role i created, I am not being taken to the login page. Instead it just opens that page, as if I was already logged in. I'm not sure why this happens.
Edit: Nevermind, I fixed it. Turns out I was already logged in without knowing.
Creating simple login functionality to protect access to site
I need to protect access to my site via a login. This means all pages, including the root should be protected and redirect to a login page. I've used the macro partial view snippet to create a login view and inserted it onto a template, but I don't know how to make the page redirect after a successful login.
When I try to set up public access on my content nodes it also asks for an error page, but I saw no snippet for that. Is this necessary, and if so, what needs to be on that page?
I've followed all the videos on Umbraco TV for the member API, but he doesn't explain or show all the code, so I'm stuck in that regard.
Is this the same as: https://our.umbraco.org/forum/using-umbraco-and-getting-started/88049-login-page-on-page-root ?
Ah, I didn't see your answer sorry.
No, I am having a different problem. When I go to any of the pages which have the public access specified to a role i created, I am not being taken to the login page. Instead it just opens that page, as if I was already logged in. I'm not sure why this happens.
Edit: Nevermind, I fixed it. Turns out I was already logged in without knowing.
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.