File tree Expand file tree Collapse file tree 3 files changed +9
-9
lines changed
FirebaseSwiftUI/FirebaseAuthSwiftUI/Sources Expand file tree Collapse file tree 3 files changed +9
-9
lines changed Original file line number Diff line number Diff line change @@ -40,7 +40,7 @@ public enum AuthenticationState {
40
40
}
41
41
42
42
public enum AuthenticationFlow {
43
- case login
43
+ case signIn
44
44
case signUp
45
45
}
46
46
@@ -94,7 +94,7 @@ public final class AuthService {
94
94
public let string : StringUtils
95
95
public var currentUser : User ?
96
96
public var authenticationState : AuthenticationState = . unauthenticated
97
- public var authenticationFlow : AuthenticationFlow = . login
97
+ public var authenticationFlow : AuthenticationFlow = . signIn
98
98
public var errorMessage = " "
99
99
public let passwordPrompt : PasswordPromptCoordinator = . init( )
100
100
Original file line number Diff line number Diff line change @@ -23,7 +23,7 @@ public struct AuthPickerView {
23
23
24
24
private func switchFlow( ) {
25
25
authService. authenticationFlow = authService
26
- . authenticationFlow == . login ? . signUp : . login
26
+ . authenticationFlow == . signIn ? . signUp : . signIn
27
27
}
28
28
29
29
private var isAuthModalPresented : Binding < Bool > {
@@ -59,7 +59,7 @@ extension AuthPickerView: View {
59
59
EmailLinkView ( )
60
60
case . authPicker:
61
61
if authService. emailSignInEnabled {
62
- Text ( authService. authenticationFlow == . login ? authService. string
62
+ Text ( authService. authenticationFlow == . signIn ? authService. string
63
63
. emailLoginFlowLabel : authService. string. emailSignUpFlowLabel)
64
64
Divider ( )
65
65
EmailAuthView ( )
@@ -71,7 +71,7 @@ extension AuthPickerView: View {
71
71
Divider ( )
72
72
HStack {
73
73
Text ( authService
74
- . authenticationFlow == . login ? authService. string. dontHaveAnAccountYetLabel :
74
+ . authenticationFlow == . signIn ? authService. string. dontHaveAnAccountYetLabel :
75
75
authService. string. alreadyHaveAnAccountLabel)
76
76
Button ( action: {
77
77
withAnimation {
Original file line number Diff line number Diff line change @@ -41,7 +41,7 @@ public struct EmailAuthView {
41
41
public init ( ) { }
42
42
43
43
private var isValid : Bool {
44
- return if authService. authenticationFlow == . login {
44
+ return if authService. authenticationFlow == . signIn {
45
45
!email. isEmpty && !password. isEmpty
46
46
} else {
47
47
!email. isEmpty && !password. isEmpty && password == confirmPassword
@@ -98,7 +98,7 @@ extension EmailAuthView: View {
98
98
. padding ( . bottom, 8 )
99
99
. accessibilityIdentifier ( " password-field " )
100
100
101
- if authService. authenticationFlow == . login {
101
+ if authService. authenticationFlow == . signIn {
102
102
Button ( action: {
103
103
authService. authView = . passwordRecovery
104
104
} ) {
@@ -127,12 +127,12 @@ extension EmailAuthView: View {
127
127
128
128
Button ( action: {
129
129
Task {
130
- if authService. authenticationFlow == . login { await signInWithEmailPassword ( ) }
130
+ if authService. authenticationFlow == . signIn { await signInWithEmailPassword ( ) }
131
131
else { await createUserWithEmailPassword ( ) }
132
132
}
133
133
} ) {
134
134
if authService. authenticationState != . authenticating {
135
- Text ( authService. authenticationFlow == . login ? authService. string
135
+ Text ( authService. authenticationFlow == . signIn ? authService. string
136
136
. signInWithEmailButtonLabel : authService. string. signUpWithEmailButtonLabel)
137
137
. padding ( . vertical, 8 )
138
138
. frame ( maxWidth: . infinity)
You can’t perform that action at this time.
0 commit comments