File tree Expand file tree Collapse file tree 2 files changed +11
-11
lines changed
FirebaseSwiftUI/FirebaseAuthSwiftUI/Sources/Services
samples/swiftui/FirebaseSwiftUIExample/FirebaseSwiftUIExample Expand file tree Collapse file tree 2 files changed +11
-11
lines changed Original file line number Diff line number Diff line change @@ -169,19 +169,19 @@ public final class AuthService {
169169
170170 public func signIn( credentials credentials: AuthCredential ) async throws {
171171 authenticationState = . authenticating
172- if currentUser ? . isAnonymous == true , configuration . shouldAutoUpgradeAnonymousUsers {
173- try await linkAccounts ( credentials : credentials )
174- } else {
175- do {
172+ do {
173+ if currentUser ? . isAnonymous == true , configuration . shouldAutoUpgradeAnonymousUsers {
174+ try await linkAccounts ( credentials : credentials )
175+ } else {
176176 try await auth. signIn ( with: credentials)
177177 updateAuthenticationState ( )
178- } catch {
179- authenticationState = . unauthenticated
180- errorMessage = string. localizedErrorMessage (
181- for: error
182- )
183- throw error
184178 }
179+ } catch {
180+ authenticationState = . unauthenticated
181+ errorMessage = string. localizedErrorMessage (
182+ for: error
183+ )
184+ throw error
185185 }
186186 }
187187
Original file line number Diff line number Diff line change @@ -78,7 +78,7 @@ struct ContentView: View {
7878 let authService : AuthService
7979
8080 init ( ) {
81- // Auth.auth().signInAnonymously()
81+ Auth . auth ( ) . signInAnonymously ( )
8282
8383 let actionCodeSettings = ActionCodeSettings ( )
8484 actionCodeSettings. handleCodeInApp = true
You can’t perform that action at this time.
0 commit comments