I am using the ASP.NET Core & Angular 7 solution.
When I click on the Login link from the public website, the system redirects me to "http://localhost:4200/account/login?ss=true&returnUrl=http://localhost:45776/Account/Login" which displays the Angular app login. Then, when I login, the sytems redirects back to the public website Account controller, as per the returnUrl, which then redirects me back to the public website home page by default.
After login, I would like to redirect to a page in the Angular app based on the user's role or user preference.
Is this currently possible? If so, where is it documented how to do this? Any suggetions would be appreciated.
Thanks,
Al
5 Answer(s)
-
0
Do it in the Account controller, as you have found.
Markdown is supportedCopy & paste or drag & drop images (max 30 MB per image) -
0
How does the system currenlty know what page to display after a user logins?
It looks like the 'admin" user shows the Dashboard, but if I create another user, the Notifications page displays.
Markdown is supportedCopy & paste or drag & drop images (max 30 MB per image) -
0
It's determined by
selectBestRoutein auth-route-guard.ts.Markdown is supportedCopy & paste or drag & drop images (max 30 MB per image) -
0
Thanks. I now see how the initial page is determined based on the following logic:
selectBestRoute(): string { if (this._permissionChecker.isGranted('Pages.Administration.Host.Dashboard')) { return '/app/admin/hostDashboard'; } if (this._permissionChecker.isGranted('Pages.Tenant.Dashboard')) { return '/app/main/dashboard'; } return '/app/notifications'; }Unfortunately, this requires a code change if you need to add a new or different route (i.e., initial page). It would be nice if there was the ability to assign the initial page to a Role and/or User using the Admin UI. Is it possible to put this on the roadmap?
Markdown is supportedCopy & paste or drag & drop images (max 30 MB per image) -
0
Unfortunately, this requires a code change if you need to add a new or different route (i.e., initial page). It would be nice if there was the ability to assign the initial page to a Role and/or User using the Admin UI. Is it possible to put this on the roadmap?
@ogrodski unfortunately, there is no such feature right now.
Markdown is supportedCopy & paste or drag & drop images (max 30 MB per image)