Copied to clipboard

Flag this post as spam?

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


  • Tomasz 22 posts 96 karma points
    Sep 30, 2019 @ 06:54
    Tomasz
    0

    Where on earth is Member / User Login method?!

    I have spent pretty much most of the day trying to find how I can call login and check if a Member is in a group, and I am unable to find a way to do so.

    I am creating a custom auth filter, which I want to decorate my Umbraco API Controller with, but I am getting nowhere; no documentation anywhere, no samples, I'm stuck.

    The Login or SignIn or whatever method is nowhere to be found!

    I believe I tried injecting all services I could think of into my class (IMemberService, IMembershipMemberService, IMembershipUserService, IUserService, IUmbracoContextFactory), none of which have a Login / SignIn anywhere!!! I even tried to inject IContentService for a laugh...

    And I've also checked the source code in github, none of these services have a Login anywhere...

    I've tried all sorts of searches on the Forum, but no luck here either...

    Help please!!!

  • Sebastiaan Janssen 5061 posts 15544 karma points MVP admin hq
    Sep 30, 2019 @ 07:38
    Sebastiaan Janssen
    3

    The easiest way is to:

    • Go to Settings
    • Right click "Partial Views"
    • Choose "Create" > "New partial view from snippet..."
    • And there you choose either Register Member, Edit Profile, Login and LoginStatus

    From there you will be able to use these views in your templates.

    If you want to know how this works in the code (or implement your own), make sure to check out the related controllers:

    Hope this helps getting you a bit further along.

  • Tomasz 22 posts 96 karma points
    Sep 30, 2019 @ 19:46
    Tomasz
    0

    Sebastiaan,

    thank you for your response, apology, but I don't believe your response is quite relevant here. I should have included the article link in the first place for clarity (or maybe I am not seeing from a little too much frustration...?).

    I am trying to achieve the following, in Umbraco8:

    https://our.umbraco.com/forum/umbraco-7/developing-umbraco-7-packages/57862-Authentication-to-call-the-WebAPI-by-external-application

    As I mentioned, I can't see how I can inject the right services into my attribute filter to be able to expose "login" method, etc.

    I guess I'll try to write my own Custom UmbLogin Controller and see if I can use that instead as my API endpoint.

  • 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