0
wazbek created
HI
I try to browse to a page on our website, say /setting-management
but I am not logged in yet. I get redirected to the /account/login
screen as expected. I then login but I am not redirected back to the /setting-management
page which I first navigated to.
I had a look at the AuthGuard and found this line of code router.navigate(['/account/login'], { state: { redirectUrl: state.url } });
How can I get this to work as expected?
4 Answer(s)
-
0
Hi
We'll fix the problem. Until the problem is resolved, you can protect the page via
AuthGuard
as shown below:// app-routing.module.ts import { ..., AuthGuard } from '@abp/ng.core'; //... { path: 'setting-management', canActivate: [AuthGuard], // added canActivate //... }
-
0
Hi Mehmet
Thanks. I am already protecting my routes with the AuthGuard.
Any idea when this fix will be released?
-
0
May 21, 2020,
See the milestones: https://github.com/abpframework/abp/milestones
-
0
Thank you.