Questions tagged [canactivate]
145 questions
0
votes
2 answers
Check the text field, text view, and image view to activate the button in swift
I am trying to implement the sign up view.
This view uses an image picker to check if an image is set,
and if all three text fields are not empty and the text view below is not empty,
I want to implement a view in which the next button is…

Hyunwoo
- 21
- 1
- 6
0
votes
3 answers
AuthGuard showing blank page
I am using AuthGuard to protect components until a user is logged in. The AuthGuards works, but whenever changes in the components are made and saved, the page refreshes itself and becomes blank and there are no errors in the console.
I have looked…
user13108606
0
votes
1 answer
Angular Firebase Routeguard Authentication
I am actually learning Angular and firebase, I want to add a route guard to users dashboard so that only logged in users can view the page. The Authentication works fine but I am having issues restricting none logged in users to access users…

Gabriel Geelario
- 227
- 1
- 2
- 16
0
votes
0 answers
On click, redirect to a route for which canActive returned false once
I have a guard on a route with 3 children. I land in a ZeroStateComponent when I do not have data. In the ZeroStateComponent, I have a Get started button which is supposed to land me to the Admin route again.
Nothing is happening when I click on…

Empty
- 350
- 2
- 4
- 22
0
votes
0 answers
can activate guard validating url params
I'm trying to use canActivate guard in angular to validate url parameters. I'm trying to redirect to /node-info, my validation returns true if the url params exist.
The redirect is re-directing to the home page at the moment and I can't figure out…

Harriet Pies
- 39
- 2
0
votes
1 answer
canActivate - slows down the app. When to call it?
I have an angular app with .net core back-end. I am using windows active directory for user authorization/identification. Everything is working, but I have a feeling that the app is slow... I have confirmed that this is happening because because I…

sosNiLa
- 289
- 6
- 18
0
votes
2 answers
BehaviorSubject in angular returning null
I am using BehaviorSubject to store user info on login. For some weird reason, the user info returned by BehaviorSubject is null in AuthGuard that gets activated for my endpoint. Please help me understand what am I missing.
I have already tried to…

scu
- 11
- 1
- 4
0
votes
1 answer
canActivate routeguard with nested observables using switchmap operator works only from browser
I am using firebase with authentication and firestore. Authenticated users are stored in database upon signup with extra roles field where some user have 'admin' role. I want to protect the admin route and i use the canActivate route guard. In the…

Nándor Szűcs
- 151
- 1
- 9
0
votes
2 answers
Angular 4 GET Request (Observable)
I'm trying to get an observable in Angular 4 project\
The get request is okay but I'm getting pushed away to 403 unauthorized page while I'm the admin,
I'm trying to understand the problem of this, I debugged the code but I cant get it, The code run…

O. Dror
- 93
- 1
- 10
0
votes
1 answer
angular 2+ canDeactivate async:false
"async: false" has been removed from the chrome browser.
Therefore, I can no longer remove a user from my site when a page is
closed. Is there anyway around this, I have tried using an observable but it doesn't seem to call my API and the system…

chris601
- 53
- 8
0
votes
1 answer
CanLoad guard doesn't allow for '/' route
My plan was to set up a project where the main website which is on "/", is quite hefty is only lazy-loaded after actual login.
const routes: Routes = [
{ path: '', canLoad: [AuthGuard], loadChildren: './home/home.module#HomeModule' },
{ path:…

Jonas Svensson
- 65
- 1
- 5
0
votes
1 answer
How to routing in another component when use canActivate()
I want to navigate directly in here component ResetPassIdComponent whene I use canActivate(); Now, when I click for this component ResetPassIdComponent , my aplication navigate in first in /outsidelogin/login and in second in…

web site
- 99
- 8
0
votes
0 answers
Routing doesn't work when I use canActivate in Nativescript
I have a project in Nativescript. My problem in my project is in CanActivate. My canActivate don't navigate in another page when use AuthGuard.
I have this routing.ts:
const routes: Routes = [
{
path: 'home',
component: HomeComponent,
…

web site
- 99
- 8
0
votes
1 answer
Angular 7 CanActivate Guards Failing over
I've got CanActivate guards on all my routes and they are failing over.
For instance, I have two guards:
export class AuthenticationGuard implements CanActivate {
constructor(private as: AuthenticationService, private router: Router) { }
…

nbpeth
- 2,967
- 4
- 24
- 34
0
votes
1 answer
Deactivate Login Screen for certain pages in ngx-rocket angular 7 starter kit
I'm using the ngx-rocket angular7 starter kit. It has a guard implemented that will make the login screen pop up if i'm not logged in yet. to implement a registration page I don't want the login screen to pop up though, the registration page should…

Carli Beeli
- 790
- 1
- 11
- 26