firebase-video-samples icon indicating copy to clipboard operation
firebase-video-samples copied to clipboard

Sign In With Apple sheet is not dismissed on login with anonymous auth

Open Wallman opened this issue 1 year ago • 2 comments

Applies to the auth-account-linking/final project.

Expected Behavior

When signing in with Apple, the sheet is not dismissed.

Actual Behavior

Sheet stays open.

Steps to Reproduce the Problem

  1. Sign In With Apple

Specifications

iOS 17.2.1 / iPhone 14

Wallman avatar Feb 03 '24 18:02 Wallman

@peterfriese Would love to hear your input on this 🙏

Wallman avatar Feb 03 '24 18:02 Wallman

@Wallman Add this to your SingInWithAppleButton's onCompletion handler

if case .success(_) = result { dismiss() }

So that it looks something like this: (assuming you are using the auth-account-linking/final project without modification)

SignInWithAppleButton(.signIn) { request in
    viewModel.handleSignInWithAppleRequest(request)
  } onCompletion: { result in
    viewModel.handleSignInWithAppleCompletion(result)
      if case .success(_) = result { dismiss() }
  }
  

I'm making a PR to fix this issue :)

Coding-Solo avatar Mar 06 '24 04:03 Coding-Solo