-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into fix-deprecated-async
- Loading branch information
Showing
18 changed files
with
207 additions
and
99 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
.login-button { | ||
background: #f7fcfe; | ||
line-height: 45px; | ||
border: 1px solid currentColor; | ||
width: 100%; | ||
} | ||
|
||
.logo { | ||
align-items: center; | ||
display: inline-flex; | ||
margin: 0 3px 3px 3px; | ||
} | ||
|
||
.github-logo { | ||
font-size: 20px; | ||
width: 20px; | ||
height: 20px; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
<button mat-stroked-button class="login-button" color="primary" (click)="startLoginProcess()"> | ||
<span class="logo"> <img class="github-logo" src="./assets/images/github-logo.png" alt="github-logo" /> </span> | ||
<span> Login </span> | ||
</button> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
import { Component } from '@angular/core'; | ||
import { AuthService, AuthState } from '../../core/services/auth.service'; | ||
import { ErrorHandlingService } from '../../core/services/error-handling.service'; | ||
import { LoggingService } from '../../core/services/logging.service'; | ||
|
||
@Component({ | ||
selector: 'app-auth-login', | ||
templateUrl: './login.component.html', | ||
styleUrls: ['./login.component.css'] | ||
}) | ||
|
||
export class LoginComponent { | ||
constructor( | ||
private authService: AuthService, | ||
private errorHandlingService: ErrorHandlingService, | ||
private logger: LoggingService | ||
) {} | ||
|
||
startLoginProcess() { | ||
this.logger.info('LoginComponent: Beginning login process'); | ||
try { | ||
this.authService.startOAuthProcess(); | ||
} catch (error) { | ||
this.authService.changeAuthState(AuthState.NotAuthenticated); | ||
this.errorHandlingService.handleError(error); | ||
this.logger.info(`LoginComponent: Login process failed with an error: ${error}`); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.