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

Anonymous user is deleted when Apple Sign In auto upgrade is started but cancelled #827

Closed
kdziemia opened this issue Jan 14, 2020 · 1 comment
Assignees

Comments

@kdziemia
Copy link

kdziemia commented Jan 14, 2020

Description

I have an application which allows the user to to sign in anonymously during on-boarding. The user can sign in at a later time using Google/Facebook/Apple Sign In. When starting and cancelling the auto upgrade process using Apple Sign In, the user account is deleted and the user is forced to sign in again, effectively losing their data. I have not found a workaround other than disabling/hiding the Apple Sign In button during the auto upgrade process, which may be against Apple guidelines. I have not attempted to release the application with the button hidden/disabled. I have verified that Apple Sign In works otherwise.

Environment:

Objective C or Swift: Swift
iOS version: 13.1.2
FirebaseUI version: 8.4
CocoaPods Version: 1.8.4

Steps to reproduce:

  1. Sign in via Anonymous Auth.
  2. Show FirebaseUI auth controller with Apple Sign In option, shouldAutoUpgradeAnonymousUsers=true.
  3. Click 'Apple Sign In' option.
  4. On the first Apple Sign In prompt, click cancel.
  5. Cancel auth controller to return to the app.
  6. Close and restart the app.

Observed Results:

User is deleted. User must sign in again. Their previous data is effectively lost.
Never receive callback that login was cancelled.

Expected Results:

User should not be signed out if the sign in process was cancelled. I've verified that cancelling Google or Facebook sign in flow has no such effect.
Should receive callback that login was cancelled.

Relevant Code:

Looks to me thatFUIOAuth.signOut is called when the sign in flow is initiated, which in turn calls FIRUser.deleteWithCompletion.

@morganchen12
Copy link
Contributor

Thanks for reporting this. This bug should be fixed in master (#824). I'll cut a release by EOD.

@morganchen12 morganchen12 self-assigned this Jan 21, 2020
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

No branches or pull requests

2 participants