Copied to clipboard

Flag this post as spam?

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


  • Carl Schéle 12 posts 32 karma points
    May 10, 2024 @ 07:30
    Carl Schéle
    0

    Redirect after user login

    I use Umbraco 13.3.0 and I want to redirect my user to the start page rather than to backoffice on a successful (user) login. I have tried to hook into the UserLoginSuccessNotification and do a redirect there but it still takes me to the backoffice. Any suggestions?

  • Huw Reddick 1875 posts 6421 karma points MVP 2x c-trib
    May 10, 2024 @ 07:56
    Huw Reddick
    0

    Hi Carl,

    Are you perhaps getting confused between Users and Members? The whole point if Users is that they login to gain access to the backoffice.

  • Carl Schéle 12 posts 32 karma points
    May 10, 2024 @ 08:05
    Carl Schéle
    0

    No, not confused. I know that's the main purpose but in this case I don't want the user to see the backoffice at first sight.

  • Huw Reddick 1875 posts 6421 karma points MVP 2x c-trib
    May 10, 2024 @ 08:20
    Huw Reddick
    0

    So how will they get access to the backoffice if you redirect them somewhere else?

  • Carl Schéle 12 posts 32 karma points
    May 10, 2024 @ 08:34
    Carl Schéle
    0

    Well this is just on the login but you can still browse to /umbraco or have a button/link that will take them to backoffice.

    Basically i just want to know if it's possible to create a custom redirect after a successful user login.

  • Huw Reddick 1875 posts 6421 karma points MVP 2x c-trib
    May 10, 2024 @ 09:12
    Huw Reddick
    0

    I'm not sure that is possible TBH

  • Danine Noble 82 posts 368 karma points
    May 13, 2024 @ 19:29
    Danine Noble
    0

    Imagining myself as an author/editor/backoffice user, if I am logging in to the backoffice, that likely means I'm looking to do some authoring/editing. Getting redirected somewhere else for a 'splash' page that requires I then do an extra click to get back to where I need/want to be is bad UX.

    Does a custom dashboard not serve your purpose of supplying a start page? Doesn't take everyone away from where they need to be and allows you to customize what they see when they log in.

  • Jeremy Schlosser 12 posts 123 karma points
    Jun 06, 2024 @ 16:56
    Jeremy Schlosser
    0

    I'm also in need of a solution to this question. Thank you Carl for asking.

    Here is my use case: We are displaying content that only authenticated users can see on the front end, using the Our.Umbraco.TagHelpers package. We have an edit link to edit the current page, and we're displaying sensitive data only to logged in users. In this case, the users do not need to edit pages in BackOffice, they simply need to be logged in to see the sensitive content on the page they were on. I've provided a log in link, with hopes the user can be quietly authenticated and then have the sensitive information displayed on the front end. But to send the newly logged-in user to BackOffice is disorienting and they have to navigate back to the page they were on. It would be much more seamless to redirect to the page they were on.

    It would be awesome to use a URL parameter on my login link, something like ./umbraco/login?redirect=URL

  • Huw Reddick 1875 posts 6421 karma points MVP 2x c-trib
    Jun 07, 2024 @ 05:45
    Huw Reddick
    1

    I think you are confusing users and members. To restrict frontend UI pages you use members not users.

  • Adriano Fabri 469 posts 1633 karma points
    Jun 07, 2024 @ 09:43
    Adriano Fabri
    0

    Hi to all, I think you are making a little bit of confusion between Users (can only access to backoffice) and Members (can only access to frontend)

    Members cannot authenticate into backoffice and Users cannot authenticate into frontend (this is valid also if you, for example, create a user and a member with same username/password...they are completely different environments and authentications).

    @Carl Schéle: what you want to do, if I understand correctly, is not possible unless you create a link between two users (user/member...for example a field with the Id of the user or member) so that in the partial view you can check whether the authenticated member is linked to the user . This solution, however, requires that both users (user and member) are authenticated in their environments (backoffice and frontend respectively). This method is not recommended.

    @Jeremy Schlosser: you can assign, in backoffice, the content to a specific member or group of members (for example with a dropdown with the member list) so the member authenticated can view only the content that he is enabled.

    I hope this helps you and clarified the difference between Users and Members Adriano

  • Simon Napper 109 posts 343 karma points
    Jun 07, 2024 @ 09:58
    Simon Napper
    0

    @Carl Schéle So is the following what you're after?

    You want to have a set up whereby you want certain individuals to be able to log into the back office, see a splash page with some info (but not the back office) and then be taken back to the front end of the site. After which, when they navigate the front end of the website, they have a link on each page that allows them to edit it as they are authenticated users? Is that right?

    If so, would you expect them to be taken to the back office for that page when they click on the link?

Please Sign in or register to post replies

Write your reply to:

Draft