We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 09c8c00 commit 7d7a039Copy full SHA for 7d7a039
1 file changed
FirebaseSwiftUI/FirebaseAuthSwiftUI/Sources/FirebaseAuthSwiftUI/Services/EmailProvider.swift
@@ -10,14 +10,8 @@ public class EmailAuthProvider {
10
}
11
12
func signIn(withEmail email: String, password: String) async throws {
13
- authEnvironment.authenticationState = .authenticating
14
- do {
15
- try await authEnvironment.auth.signIn(withEmail: email, password: password)
16
- authEnvironment.updateAuthenticationState()
17
- } catch {
18
- authEnvironment.authenticationState = .unauthenticated
19
- throw error
20
- }
+ let credential = FirebaseAuth.EmailAuthProvider.credential(withEmail: email, password: password)
+ try await authEnvironment.signIn(with: credential)
21
22
23
func createUser(withEmail email: String, password: String) async throws {
0 commit comments