Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • ThomasBrunbjerg 90 posts 182 karma points
    Sep 13, 2017 @ 08:26
    ThomasBrunbjerg
    0

    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.

  • Ayo Adesina 430 posts 1023 karma points
    Sep 13, 2017 @ 08:31
  • ThomasBrunbjerg 90 posts 182 karma points
    Sep 13, 2017 @ 08:39
    ThomasBrunbjerg
    0

    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.

Please Sign in or register to post replies

Write your reply to:

Draft