app.component.ts 494 B

123456789101112131415161718192021222324
  1. import { Component } from '@angular/core';
  2. import { AuthService } from '@auth0/auth0-angular';
  3. @Component({
  4. selector: 'app-root',
  5. templateUrl: './app.component.html',
  6. styleUrls: ['./app.component.scss']
  7. })
  8. export class AppComponent {
  9. public title = 'RunnersMeet';
  10. public constructor(
  11. public readonly authService: AuthService
  12. ) {
  13. }
  14. public login(): void {
  15. this.authService.loginWithRedirect();
  16. }
  17. public logout(): void {
  18. this.authService.logout();
  19. }
  20. }