Copied to clipboard

Flag this post as spam?

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


  • rdmDev 8 posts 108 karma points
    Feb 12, 2019 @ 11:37
    rdmDev
    0

    Hello all.

    I've installed Umbraco 7.12.4 (on IIS Express) using Visual Studio Code and things have been going well until now.

    Basically, "Member" account creation through the Back Office works correctly. However, none of these accounts can log in, with the following error appearing in Chrome "devtools":

    "http://localhost:42507/umbraco/backoffice/UmbracoApi/Authentication/PostLogin 400 (Bad Request)"

    I have followed the tutorial on https://our.umbraco.com/documentation/Getting-Started/Data/Members/ and:

    • Created a Member ("test").
    • Created a Member Group ("Registered Users") & assigned the Member.
    • Created a "test page".
    • Under "Public access" for the "test page", added "Role Based Protection" for the Member group ("Registered Users").
    • Defined the "Login" & "Error" pages for the "Role based Protection" applied to the "test" page.

    ..Yet when I attempt to log in with any Member account, I see "Login failed for user test" & the error in DevTools.

    Can anyone enlighten me as to why this is happening? I've followed the tutorials on both our.umbraco and umbraco.tv and simply cannot get this to work. I'm wondering if there is something I have missed out in the steps above.

    Thanks in advance for your time.

  • Craig Mayers 164 posts 508 karma points
    Feb 12, 2019 @ 15:17
    Craig Mayers
    0

    Hi rdmDev,

    Can you share the code you are using to handle the Login attempts?

    Also, if you open the URL that is being returned in the browser console window it might show you some more specific error details.

    Thanks

    Craig

  • rdmDev 8 posts 108 karma points
    Feb 12, 2019 @ 15:31
    rdmDev
    0

    Hello Craig.

    There's no custom code at the moment, I'm simply adding a new Member in the Back Office then attempting to login as that Member.

    I see a "Login failed for user" message and when checking DevTools see the following:

    • XML Parsing Error: no root element found Location: https://my site URL removed/umbraco/backoffice/UmbracoApi/Authentication/PostLogin Line Number 1, Column 1:

    When I "view source" on the error I see the following: - view-source:https://my site URL removed/umbraco/backoffice/UmbracoApi/Authentication/PostLogin

    )]}', {"Message":"The requested resource does not support http method 'GET'."}

    The message above looks like a redirect is occurring? This is on a basic site with the "Starter Kit", running locally on "Visual Code with IIS Express".

    Thanks for responding =]

  • Gary Winter 19 posts 160 karma points
    Feb 18, 2019 @ 15:55
    Gary Winter
    100

    Have you created a Front End Member Login page? Using the new partial view from snippet and member Login?

  • rdmDev 8 posts 108 karma points
    Feb 19, 2019 @ 09:08
    rdmDev
    0

    Hello all.

    I think this problem was down to inexperience on my part: I had been attempting to login with a "Member" account through the "Users" login form ("www.mysite.com/umbraco").

    We've purchased a "Uskinned theme" which has a "/members-area" with "login" and "error" page specified for pages with "role based protection". So it looks like the approach suggested by Gary was the correct one.

    If I understand this correctly, the "www.mysite.com/umbraco" form is to login to the Back Office, with the "Members" login requiring to be set up (or already set up by a theme). Is this correct?

    Many thanks to everyone for their time. It's appreciated =]

  • Gary Winter 19 posts 160 karma points
    Feb 19, 2019 @ 09:17
    Gary Winter
    0

    Yes that’s correct, I have only been using Umbraco for 2 months so still learning myself.

Please Sign in or register to post replies

Write your reply to:

Draft