Copied to clipboard

Flag this post as spam?

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


  • Chriztian Steinmeier 2798 posts 8788 karma points MVP 7x admin c-trib
    Aug 13, 2017 @ 20:50
    Chriztian Steinmeier
    0

    Specify login screen returnPath to frontend

    Hi all,

    Is it possible to extend the login screen / controller to redirect to a frontend page after successful login?

    The current implementation (with a returnPath pseudo querystring parameter) can only redirect inside the backoffice (it seems?), because well, Angular, I guess...

    I'd love to be able to specify something like returnPath=/dashboard/today and have it work.

    /Chriztian

  • Janae Cram 63 posts 439 karma points MVP 7x c-trib
    Aug 21, 2017 @ 18:02
    Janae Cram
    0

    I'm trying to do something similar to this as well and would love to know if someone has an answer :)

  • Anders Bjerner 487 posts 2989 karma points MVP 7x admin c-trib
    Aug 21, 2017 @ 19:37
    Anders Bjerner
    100

    Just a little follow up to the conversation on Twitter:

    https://github.com/umbraco/Umbraco-CMS/blob/dev-v7/src/Umbraco.Web.UI.Client/src/views/common/dialogs/login.controller.js#L116

    The highlighted line in the link above is invoked on a successful login. That line can be modified to redirect the user somewhere else. I briefly tested that, and it seems to work like a charm.

    However you're probably looking for a way to solve this without modifying Umbraco core files. I'm not an Angular expert, but I don't think is possible to without modifying core files - at least at the moment.

    If this is a feature people need, perhaps you could update the line to trigger some kind of Angular event, that developers then can hook into, and then create a pull request.

    But as always when working with login, we need to think about any potential security issues a change like this could raise. So perhaps the best thing to do, is to create an issue on the tracker, and start a discussion with the people from the HQ, and then take it from there ;)

Please Sign in or register to post replies

Write your reply to:

Draft