Skip to content

Commit 3012316

Browse files
committed
ui updates
1 parent 71db259 commit 3012316

File tree

11 files changed

+221
-75
lines changed

11 files changed

+221
-75
lines changed

FirebaseSwiftUI/FirebaseAppleSwiftUI/Sources/Services/AppleProviderAuthUI.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ public class AppleProviderSwift: AuthProviderSwift, DeleteUserSwift {
144144
}
145145
}
146146

147-
public class AppleProviderAuthUI: AuthProviderUI {
147+
@MainActor public class AppleProviderAuthUI: AuthProviderUI {
148148
public var provider: AuthProviderSwift
149149

150150
public init(provider: AuthProviderSwift) {

FirebaseSwiftUI/FirebaseAuthSwiftUI/Sources/FirebaseAuthView/Views/FirebaseAuthViewInternal.swift

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -180,13 +180,13 @@ struct FirebaseAuthViewInternal: View {
180180
}
181181
.alert(
182182
isPresented: $isShowingErrorAlert,
183-
error: StringError(message: authService.errorMessage)
183+
error: StringError(message: authService.currentError?.message ?? "")
184184
) {
185185
Button("OK") {
186186
isShowingErrorAlert = false
187187
}
188188
}
189-
.onChange(of: authService.errorMessage) { _, newValue in
189+
.onChange(of: authService.currentError?.message ?? "") { _, newValue in
190190
debugPrint("onChange: \(newValue)")
191191
isShowingErrorAlert = !newValue.isEmpty
192192
}
@@ -283,19 +283,19 @@ struct FirebaseAuthViewInternal: View {
283283

284284
private func handleEmailSignIn() {
285285
Task {
286-
try? await authService.signIn(withEmail: email, password: password)
286+
try? await authService.signIn(email: email, password: password)
287287
}
288288
}
289289

290290
private func handleEmailSignUp() {
291291
Task {
292-
try? await authService.createUser(withEmail: email, password: password)
292+
try? await authService.createUser(email: email, password: password)
293293
}
294294
}
295295

296296
private func handleSendResetLink() {
297297
Task {
298-
try? await authService.sendPasswordRecoveryEmail(to: email)
298+
try? await authService.sendPasswordRecoveryEmail(email: email)
299299
}
300300
}
301301

FirebaseSwiftUI/FirebaseAuthSwiftUI/Sources/Strings/Localizable.xcstrings

Lines changed: 144 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,12 @@
1313
}
1414
}
1515
}
16+
},
17+
"••••••%@" : {
18+
19+
},
20+
"Account: %@" : {
21+
1622
},
1723
"AccountDisabledError" : {
1824
"comment" : "Error message displayed when the account is disabled. Use short/abbreviated translation for 'email' which is less than 15 chars.",
@@ -37,6 +43,12 @@
3743
}
3844
}
3945
}
46+
},
47+
"Add an extra layer of security to your account" : {
48+
49+
},
50+
"Add Another Method" : {
51+
4052
},
4153
"AddPasswordAlertMessage" : {
4254
"comment" : "Alert message shown when adding account password.",
@@ -172,9 +184,18 @@
172184
}
173185
}
174186
}
187+
},
188+
"as:" : {
189+
175190
},
176191
"Authentication" : {
177192

193+
},
194+
"Authentication Method" : {
195+
196+
},
197+
"Authenticator App" : {
198+
178199
},
179200
"AuthPickerTitle" : {
180201
"comment" : "Title for auth picker screen.",
@@ -232,6 +253,12 @@
232253
},
233254
"Check your email at %@ for a link to reset your password." : {
234255

256+
},
257+
"Choose Authentication Method" : {
258+
259+
},
260+
"Choose verification method:" : {
261+
235262
},
236263
"ChoosePassword" : {
237264
"comment" : "Placeholder for the password text field in a sign up form.",
@@ -256,6 +283,15 @@
256283
}
257284
}
258285
}
286+
},
287+
"Complete Setup" : {
288+
289+
},
290+
"Complete Sign-In" : {
291+
292+
},
293+
"Complete sign-in with your second factor" : {
294+
259295
},
260296
"ConfirmEmail" : {
261297
"comment" : "Title of confirm email label.",
@@ -280,6 +316,9 @@
280316
}
281317
}
282318
}
319+
},
320+
"Copied to clipboard!" : {
321+
283322
},
284323
"Create Account" : {
285324

@@ -359,6 +398,9 @@
359398
}
360399
}
361400
}
401+
},
402+
"Display Name" : {
403+
362404
},
363405
"Don't have an account yet?" : {
364406
"localizations" : {
@@ -477,12 +519,33 @@
477519
}
478520
}
479521
}
522+
},
523+
"Enrolled Methods" : {
524+
525+
},
526+
"Enrolled: %@" : {
527+
528+
},
529+
"Enter 6-digit code" : {
530+
531+
},
532+
"Enter Code from App" : {
533+
534+
},
535+
"Enter the 6-digit code from your authenticator app" : {
536+
537+
},
538+
"Enter Verification Code" : {
539+
480540
},
481541
"Enter verification code digit" : {
482542

483543
},
484544
"Enter your email address and we'll send you a link to reset your password." : {
485545

546+
},
547+
"Enter Your Phone Number" : {
548+
486549
},
487550
"Enter your phone number to get started" : {
488551

@@ -573,6 +636,9 @@
573636
}
574637
}
575638
}
639+
},
640+
"Get Started" : {
641+
576642
},
577643
"InvalidEmailError" : {
578644
"comment" : "Error message displayed when user enters an invalid email address. Use short/abbreviated translation for 'email' which is less than 15 chars.",
@@ -607,6 +673,21 @@
607673
}
608674
}
609675
}
676+
},
677+
"Manage Two-Factor Authentication" : {
678+
679+
},
680+
"Manage your authentication methods" : {
681+
682+
},
683+
"Manual Entry Key:" : {
684+
685+
},
686+
"MFA is not enabled in the current configuration. Please contact your administrator." : {
687+
688+
},
689+
"Multi-Factor Authentication Disabled" : {
690+
610691
},
611692
"Name" : {
612693
"comment" : "Label next to a name text field.",
@@ -631,6 +712,15 @@
631712
}
632713
}
633714
}
715+
},
716+
"No Authentication Methods" : {
717+
718+
},
719+
"No Authentication Methods Available" : {
720+
721+
},
722+
"No MFA methods are configured as allowed. Please contact your administrator." : {
723+
634724
},
635725
"OK" : {
636726
"comment" : "OK button title.",
@@ -706,6 +796,9 @@
706796
}
707797
}
708798
}
799+
},
800+
"Phone Number" : {
801+
709802
},
710803
"PlaceholderChosePassword" : {
711804
"comment" : "Placeholder of secret input cell when user changes password.",
@@ -850,6 +943,9 @@
850943
}
851944
}
852945
}
946+
},
947+
"Remove" : {
948+
853949
},
854950
"Resend" : {
855951
"comment" : "Resend button title.",
@@ -883,6 +979,12 @@
883979
}
884980
}
885981
}
982+
},
983+
"Scan QR Code" : {
984+
985+
},
986+
"Scan with your authenticator app or tap to open directly" : {
987+
886988
},
887989
"Send" : {
888990
"comment" : "Send button title.",
@@ -913,6 +1015,12 @@
9131015
}
9141016
}
9151017
}
1018+
},
1019+
"Set Up Two-Factor Authentication" : {
1020+
1021+
},
1022+
"Set up two-factor authentication to add an extra layer of security to your account." : {
1023+
9161024
},
9171025
"Sign in" : {
9181026

@@ -1021,6 +1129,18 @@
10211129
}
10221130
}
10231131
}
1132+
},
1133+
"SMS Authentication" : {
1134+
1135+
},
1136+
"SMS Verification" : {
1137+
1138+
},
1139+
"SMS: %@" : {
1140+
1141+
},
1142+
"Tap to open in authenticator app" : {
1143+
10241144
},
10251145
"TermsOfService" : {
10261146
"comment" : "Text linked to a web page with the Terms of Service content.",
@@ -1069,6 +1189,12 @@
10691189
}
10701190
}
10711191
}
1192+
},
1193+
"Two-Factor Authentication" : {
1194+
1195+
},
1196+
"Unable to generate QR Code" : {
1197+
10721198
},
10731199
"UnlinkAction" : {
10741200
"comment" : "Button title for unlinking account action.",
@@ -1164,6 +1290,9 @@
11641290
}
11651291
}
11661292
}
1293+
},
1294+
"Use an authenticator app like Google Authenticator or Authy to generate verification codes." : {
1295+
11671296
},
11681297
"UserNotFoundError" : {
11691298
"comment" : "Error message displayed when there's no account matching the email address. Use short/abbreviated translation for 'email' which is less than 15 chars.",
@@ -1176,6 +1305,9 @@
11761305
}
11771306
}
11781307
}
1308+
},
1309+
"Verification Code" : {
1310+
11791311
},
11801312
"Verify Code" : {
11811313

@@ -1208,6 +1340,18 @@
12081340
},
12091341
"We sent a code to %@" : {
12101342

1343+
},
1344+
"We'll send a code to ••••••%@" : {
1345+
1346+
},
1347+
"We'll send a verification code to this number" : {
1348+
1349+
},
1350+
"We'll send a verification code to your phone" : {
1351+
1352+
},
1353+
"We'll send a verification code to your phone number each time you sign in." : {
1354+
12111355
},
12121356
"WeakPasswordError" : {
12131357
"comment" : "Error message displayed when the password is too weak.",

FirebaseSwiftUI/FirebaseFacebookSwiftUI/Sources/Services/FacebookProviderAuthUI.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ public class FacebookProviderSwift: AuthProviderSwift, DeleteUserSwift {
123123
}
124124
}
125125

126-
public class FacebookProviderAuthUI: AuthProviderUI {
126+
@MainActor public class FacebookProviderAuthUI: AuthProviderUI {
127127
public var provider: AuthProviderSwift
128128
public let id: String = "facebook.com"
129129

FirebaseSwiftUI/FirebaseGoogleSwiftUI/Sources/Services/GoogleProviderAuthUI.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ public class GoogleProviderSwift: AuthProviderSwift, DeleteUserSwift {
7575
}
7676
}
7777

78-
public class GoogleProviderAuthUI: AuthProviderUI {
78+
@MainActor public class GoogleProviderAuthUI: AuthProviderUI {
7979
public var provider: AuthProviderSwift
8080
public let id: String = "google.com"
8181

FirebaseSwiftUI/FirebaseOAuthSwiftUI/Sources/Services/OAuthProviderSwift.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ public class OAuthProviderSwift: AuthProviderSwift, DeleteUserSwift {
120120
}
121121
}
122122

123-
public class OAuthProviderAuthUI: AuthProviderUI {
123+
@MainActor public class OAuthProviderAuthUI: AuthProviderUI {
124124
public var provider: AuthProviderSwift
125125

126126
public init(provider: AuthProviderSwift) {

FirebaseSwiftUI/FirebasePhoneAuthSwiftUI/Sources/Services/PhoneAuthProviderAuthUI.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ public class PhoneProviderSwift: PhoneAuthProviderSwift {
6565
}
6666
}
6767

68-
public class PhoneAuthProviderAuthUI: AuthProviderUI {
68+
@MainActor public class PhoneAuthProviderAuthUI: AuthProviderUI {
6969
public var provider: AuthProviderSwift
7070
public let id: String = "phone.com"
7171

FirebaseSwiftUI/FirebaseTwitterSwiftUI/Sources/Services/TwitterProviderAuthUI.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ public class TwitterProviderSwift: AuthProviderSwift, DeleteUserSwift {
4949
}
5050
}
5151

52-
public class TwitterProviderAuthUI: AuthProviderUI {
52+
@MainActor public class TwitterProviderAuthUI: AuthProviderUI {
5353
public var provider: AuthProviderSwift
5454

5555
public init(provider: AuthProviderSwift) {

0 commit comments

Comments
 (0)