Copied to clipboard

Flag this post as spam?

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


  • Matthew Kirschner 323 posts 611 karma points
    Jul 01, 2015 @ 20:33
    Matthew Kirschner
    0

    MemberAuthorize Redirect to Login

    Reading this page (https://our.umbraco.org/documentation/Reference/WebApi/authorization), I now know how to add a member authorization attribute to actions in my controller. But how do I go about rerouting the user to a custom login page on the front end?

    Using ASP.Net membership, this is a simple matter of updating the web.config. Does Umbraco have something similar?

  • Dennis Aaen 4500 posts 18255 karma points admin hq c-trib
    Jul 01, 2015 @ 20:40
    Dennis Aaen
    0

    Hi Matthew,

    Don“t know if this article from from the Umbraco advent calendar can help you. The article is from 2012 written by Jonas Eriksson.

    http://24days.in/umbraco/2012/creating-a-login-form-with-umbraco-mvc-surfacecontroller/

    Hope this helps,

    /Dennis

  • Matthew Kirschner 323 posts 611 karma points
    Jul 01, 2015 @ 20:49
    Matthew Kirschner
    0

    Hi, Dennis.

    I actually used that article to help get me started, but it doesn't really cover how to properly use membership authorization for controller actions. In fact, the article doesn't really make use of the MemberAuthorizeAttribute at all.

  • 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.

Please Sign in or register to post replies