Skip to content

Commit aaf221f

Browse files
committed
fix(auth): Hide Google login on iOS
Hide Google login button on iOS platforms in both login and signup pages to prevent App Store rejection when Apple login is not implemented.
1 parent a1a7e79 commit aaf221f

File tree

4 files changed

+8
-0
lines changed

4 files changed

+8
-0
lines changed

src/app/features/login/login.page.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
</form>
1515

1616
<app-social-login-button
17+
*ngIf="!isIOS"
1718
[buttonText]="t('continueWithGoogle')"
1819
></app-social-login-button>
1920

src/app/features/login/login.page.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import { UntypedFormGroup } from '@angular/forms';
44
import { MatSnackBar } from '@angular/material/snack-bar';
55
import { ActivatedRoute, Router } from '@angular/router';
66
import { AlertController } from '@ionic/angular';
7+
import { Capacitor } from '@capacitor/core';
78
import { TranslocoService } from '@ngneat/transloco';
89
import { UntilDestroy, untilDestroyed } from '@ngneat/until-destroy';
910
import { FormlyFieldConfig } from '@ngx-formly/core';
@@ -37,6 +38,8 @@ export class LoginPage {
3738

3839
showResendEmailButton = false;
3940

41+
readonly isIOS = Capacitor.getPlatform() === 'ios';
42+
4043
constructor(
4144
private readonly blockingActionService: BlockingActionService,
4245
private readonly diaBackendAuthService: DiaBackendAuthService,

src/app/features/signup/signup.page.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
</form>
1919

2020
<app-social-login-button
21+
*ngIf="!isIOS"
2122
[buttonText]="t('continueWithGoogle')"
2223
></app-social-login-button>
2324

src/app/features/signup/signup.page.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import { HttpErrorResponse } from '@angular/common/http';
22
import { Component } from '@angular/core';
33
import { UntypedFormGroup } from '@angular/forms';
44
import { Router } from '@angular/router';
5+
import { Capacitor } from '@capacitor/core';
56
import { TranslocoService } from '@ngneat/transloco';
67
import { UntilDestroy, untilDestroyed } from '@ngneat/until-destroy';
78
import { FormlyFieldConfig } from '@ngx-formly/core';
@@ -31,6 +32,8 @@ export class SignupPage {
3132

3233
fields: FormlyFieldConfig[] = [];
3334

35+
readonly isIOS = Capacitor.getPlatform() === 'ios';
36+
3437
constructor(
3538
private readonly blockingActionService: BlockingActionService,
3639
private readonly diaBackendAuthService: DiaBackendAuthService,

0 commit comments

Comments
 (0)