WIP: Google login

This commit is contained in:
2022-12-05 14:20:34 +01:00
parent abb1c29ac8
commit fb823e06cd
12 changed files with 156 additions and 32 deletions

View 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();
});
});

View 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;
}
}

View 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();
});
});

View File

@@ -0,0 +1,9 @@
import { Injectable } from '@angular/core';
@Injectable({
providedIn: 'root'
})
export class AuthServiceService {
constructor() { }
}