style: format HTML and TypeScript files
All checks were successful
CI / Get Changed Files (pull_request) Successful in 26s
CI / eslint (pull_request) Successful in 51s
CI / oxlint (pull_request) Successful in 41s
CI / prettier (pull_request) Successful in 52s
CI / Docker frontend validation (pull_request) Successful in 1m46s
CI / Docker backend validation (pull_request) Successful in 29s
CI / Checkstyle Main (pull_request) Successful in 2m44s
CI / test-build (pull_request) Successful in 1m1s
All checks were successful
CI / Get Changed Files (pull_request) Successful in 26s
CI / eslint (pull_request) Successful in 51s
CI / oxlint (pull_request) Successful in 41s
CI / prettier (pull_request) Successful in 52s
CI / Docker frontend validation (pull_request) Successful in 1m46s
CI / Docker backend validation (pull_request) Successful in 29s
CI / Checkstyle Main (pull_request) Successful in 2m44s
CI / test-build (pull_request) Successful in 1m1s
This commit is contained in:
parent
75de7d1370
commit
969e2ac0da
3 changed files with 24 additions and 15 deletions
|
@ -82,20 +82,27 @@
|
|||
</button>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
|
||||
<div class="my-4 flex items-center">
|
||||
<div class="flex-grow h-px bg-deep-blue-light/30"></div>
|
||||
<span class="px-3 text-xs text-text-secondary">ODER</span>
|
||||
<div class="flex-grow h-px bg-deep-blue-light/30"></div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="mb-4">
|
||||
<button
|
||||
(click)="loginWithGithub()"
|
||||
<button
|
||||
(click)="loginWithGithub()"
|
||||
class="w-full py-2.5 px-4 rounded flex items-center justify-center bg-gray-800 hover:bg-gray-700 text-white transition-colors"
|
||||
>
|
||||
<svg class="h-5 w-5 mr-2" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor">
|
||||
<path d="M12 0C5.37 0 0 5.37 0 12c0 5.31 3.435 9.795 8.205 11.385.6.105.825-.255.825-.57 0-.285-.015-1.23-.015-2.235-3.015.555-3.795-.735-4.035-1.41-.135-.345-.72-1.41-1.23-1.695-.42-.225-1.02-.78-.015-.795.945-.015 1.62.87 1.845 1.23 1.08 1.815 2.805 1.305 3.495.99.105-.78.42-1.305.765-1.605-2.67-.3-5.46-1.335-5.46-5.925 0-1.305.465-2.385 1.23-3.225-.12-.3-.54-1.53.12-3.18 0 0 1.005-.315 3.3 1.23.96-.27 1.98-.405 3-.405s2.04.135 3 .405c2.295-1.56 3.3-1.23 3.3-1.23.66 1.65.24 2.88.12 3.18.765.84 1.23 1.905 1.23 3.225 0 4.605-2.805 5.625-5.475 5.925.435.375.81 1.095.81 2.22 0 1.605-.015 2.895-.015 3.3 0 .315.225.69.825.57A12.02 12.02 0 0 0 24 12c0-6.63-5.37-12-12-12z"/>
|
||||
<svg
|
||||
class="h-5 w-5 mr-2"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
viewBox="0 0 24 24"
|
||||
fill="currentColor"
|
||||
>
|
||||
<path
|
||||
d="M12 0C5.37 0 0 5.37 0 12c0 5.31 3.435 9.795 8.205 11.385.6.105.825-.255.825-.57 0-.285-.015-1.23-.015-2.235-3.015.555-3.795-.735-4.035-1.41-.135-.345-.72-1.41-1.23-1.695-.42-.225-1.02-.78-.015-.795.945-.015 1.62.87 1.845 1.23 1.08 1.815 2.805 1.305 3.495.99.105-.78.42-1.305.765-1.605-2.67-.3-5.46-1.335-5.46-5.925 0-1.305.465-2.385 1.23-3.225-.12-.3-.54-1.53.12-3.18 0 0 1.005-.315 3.3 1.23.96-.27 1.98-.405 3-.405s2.04.135 3 .405c2.295-1.56 3.3-1.23 3.3-1.23.66 1.65.24 2.88.12 3.18.765.84 1.23 1.905 1.23 3.225 0 4.605-2.805 5.625-5.475 5.925.435.375.81 1.095.81 2.22 0 1.605-.015 2.895-.015 3.3 0 .315.225.69.825.57A12.02 12.02 0 0 0 24 12c0-6.63-5.37-12-12-12z"
|
||||
/>
|
||||
</svg>
|
||||
Mit GitHub anmelden
|
||||
</button>
|
||||
|
|
|
@ -11,7 +11,9 @@ import { AuthService } from '@service/auth.service';
|
|||
<div class="min-h-screen bg-deep-blue flex items-center justify-center">
|
||||
<div class="text-center">
|
||||
<h2 class="text-2xl font-bold text-white mb-4">Finishing authentication...</h2>
|
||||
<div class="animate-spin rounded-full h-12 w-12 border-t-2 border-b-2 border-emerald mx-auto"></div>
|
||||
<div
|
||||
class="animate-spin rounded-full h-12 w-12 border-t-2 border-b-2 border-emerald mx-auto"
|
||||
></div>
|
||||
<p *ngIf="error" class="mt-4 text-accent-red">{{ error }}</p>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -28,7 +30,7 @@ export class OAuth2CallbackComponent implements OnInit {
|
|||
|
||||
ngOnInit(): void {
|
||||
// Check for code in URL params
|
||||
this.route.queryParams.subscribe(params => {
|
||||
this.route.queryParams.subscribe((params) => {
|
||||
const code = params['code'];
|
||||
|
||||
if (code) {
|
||||
|
@ -40,18 +42,18 @@ export class OAuth2CallbackComponent implements OnInit {
|
|||
},
|
||||
error: (err) => {
|
||||
console.error('GitHub authentication error:', err);
|
||||
this.error = err.error?.message || "Authentication failed. Please try again.";
|
||||
this.error = err.error?.message || 'Authentication failed. Please try again.';
|
||||
console.log('Error details:', err);
|
||||
|
||||
|
||||
// Redirect back to landing page after showing error
|
||||
setTimeout(() => {
|
||||
this.router.navigate(['/']);
|
||||
}, 3000);
|
||||
}
|
||||
},
|
||||
});
|
||||
} else {
|
||||
this.error = "Authentication failed. No authorization code received.";
|
||||
|
||||
this.error = 'Authentication failed. No authorization code received.';
|
||||
|
||||
// Redirect back to landing page after showing error
|
||||
setTimeout(() => {
|
||||
this.router.navigate(['/']);
|
||||
|
|
|
@ -29,7 +29,7 @@ export class AuthService {
|
|||
this.userSubject = new BehaviorSubject<User | null>(this.getUserFromStorage());
|
||||
|
||||
// Check for token in URL (OAuth callback) on initialization
|
||||
this.route.queryParams.subscribe(params => {
|
||||
this.route.queryParams.subscribe((params) => {
|
||||
const token = params['token'];
|
||||
if (token) {
|
||||
this.handleOAuthCallback(token);
|
||||
|
@ -48,7 +48,7 @@ export class AuthService {
|
|||
this.router.navigate([], {
|
||||
relativeTo: this.route,
|
||||
queryParams: {},
|
||||
replaceUrl: true
|
||||
replaceUrl: true,
|
||||
});
|
||||
}
|
||||
|
||||
|
|
Reference in a new issue