arashbi
February 19, 2016, 9:44pm
1
I tried to use canActivate on ionic2, but it seems to have no effect. I am trying to create an authentication mechanism. The method called on the canActivate is
static requireAuth(): boolean {
const { auth, router } = AuthRouteHelper;
console.log('requiring auth');
if (!auth.authenticated) router.navigate(['/Login']);
return auth.authenticated;
}
arashbi
February 22, 2016, 11:37pm
2
Can someone give me a hint please?
chooo
March 2, 2016, 7:45pm
3
I am trying to solve authentication with @CanActivate too!
Anyone?
Having the same problem too
I am using angular2-jwt, and @CanActivate have no effect
+1
Any pointers would be greatly appreciated…
atx
April 7, 2016, 11:43am
6
Hey guys, I’m struggling with this exact issue too. any help how to get this basic feature of angular working is highly appreciated
atx
April 13, 2016, 7:48am
7
Again me, this issue nagged me quite a bit, so after digging and talking to folks at #ionic-v2 I created an SO question and an Issue on GitHub:
Maybe you’ll find it interesting