WIP: Google login
This commit is contained in:
16
Frontend/src/app/auth/auth-guard.guard.spec.ts
Normal file
16
Frontend/src/app/auth/auth-guard.guard.spec.ts
Normal file
@@ -0,0 +1,16 @@
|
||||
import { TestBed } from '@angular/core/testing';
|
||||
|
||||
import { AuthGuardGuard } from './auth-guard.guard';
|
||||
|
||||
describe('AuthGuardGuard', () => {
|
||||
let guard: AuthGuardGuard;
|
||||
|
||||
beforeEach(() => {
|
||||
TestBed.configureTestingModule({});
|
||||
guard = TestBed.inject(AuthGuardGuard);
|
||||
});
|
||||
|
||||
it('should be created', () => {
|
||||
expect(guard).toBeTruthy();
|
||||
});
|
||||
});
|
||||
20
Frontend/src/app/auth/auth-guard.guard.ts
Normal file
20
Frontend/src/app/auth/auth-guard.guard.ts
Normal file
@@ -0,0 +1,20 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { ActivatedRouteSnapshot, CanActivate, CanActivateChild, RouterStateSnapshot, UrlTree } from '@angular/router';
|
||||
import { Observable } from 'rxjs';
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
})
|
||||
export class AuthGuardGuard implements CanActivate, CanActivateChild {
|
||||
canActivate(
|
||||
route: ActivatedRouteSnapshot,
|
||||
state: RouterStateSnapshot): Observable<boolean | UrlTree> | Promise<boolean | UrlTree> | boolean | UrlTree {
|
||||
return true;
|
||||
}
|
||||
canActivateChild(
|
||||
childRoute: ActivatedRouteSnapshot,
|
||||
state: RouterStateSnapshot): Observable<boolean | UrlTree> | Promise<boolean | UrlTree> | boolean | UrlTree {
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
||||
16
Frontend/src/app/auth/auth-service.service.spec.ts
Normal file
16
Frontend/src/app/auth/auth-service.service.spec.ts
Normal file
@@ -0,0 +1,16 @@
|
||||
import { TestBed } from '@angular/core/testing';
|
||||
|
||||
import { AuthServiceService } from './auth-service.service';
|
||||
|
||||
describe('AuthServiceService', () => {
|
||||
let service: AuthServiceService;
|
||||
|
||||
beforeEach(() => {
|
||||
TestBed.configureTestingModule({});
|
||||
service = TestBed.inject(AuthServiceService);
|
||||
});
|
||||
|
||||
it('should be created', () => {
|
||||
expect(service).toBeTruthy();
|
||||
});
|
||||
});
|
||||
9
Frontend/src/app/auth/auth-service.service.ts
Normal file
9
Frontend/src/app/auth/auth-service.service.ts
Normal file
@@ -0,0 +1,9 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
})
|
||||
export class AuthServiceService {
|
||||
|
||||
constructor() { }
|
||||
}
|
||||
Reference in New Issue
Block a user