Is it possible to change the deafult redirect without changing the source code of the page? If not, what is the best practice?
Maybe I need to create a new login page in my custom module and set up page redirection?
_PS: I have user roles for which the ability to view site pages should be closed._
Default Login page redirect (RedirectToPageResult("PageList")):
public async Task<IActionResult> OnPostAsync(InputModel model)
{
if (!ModelState.IsValid)
{
return Page();
}
if (await _service.SignIn(HttpContext, model.Username, model.Password))
{
return new RedirectToPageResult("PageList");
}
return Page();
}
Regards.
Hi there! Luckily this is already implemented here:
Unfortunately the redirect after login hasn't been updated correctly. We'll fix the redirect for the 8.1 release which will be out any day now!
Cool! Thank you)
By the way, where can I find an example of how to set the right page for redirection?
The code will redirect the user to the first page in the menu he/she has access to. If the user doesn鈥檛 have access to anything in the manager he/she will be logged out.
Regards
So to clarify, there's no way atm to specify that a specific user should have a certain start page in the manager.
I think this is not a problem. By the way, is it possible to create a common page at the very top of the hierarchy (for example, a welcome page as start page) so that all users have access to it?
@chybyk Are we still talking about the manager? If so, yes just insert a page at the start of the menu. Atm all page needs to be contained within a group, but we could change that for the upcoming version.
This is what it would look like if we added support for navigable first level items in the menu (The top item). I'll run it by @NJepop to see what he thinks.

For my purposes, what you showed me before is enough. But perhaps in some cases it would be more convenient.