Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
Wallman opened this issue Feb 3, 2024 · 2 comments · May be fixed by #60
Open

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

Wallman opened this issue Feb 3, 2024 · 2 comments · May be fixed by #60

Comments

@Wallman
Copy link

Wallman commented Feb 3, 2024

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
Copy link
Author

Wallman commented Feb 3, 2024

@peterfriese Would love to hear your input on this 🙏

@Coding-Solo
Copy link
Contributor

@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 Coding-Solo linked a pull request Mar 6, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants