-
Notifications
You must be signed in to change notification settings - Fork 483
Anonymous user upgrade federated #401
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 upgrade federated #401
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Had a question and a nit, otherwise LGTM
Please merge #403 first and check that travis passes.
FirebaseAuthUI/FUIAuth.h
Outdated
/** @property autoUpgradeAnonymousUsers | ||
@brief Whether to enable auto upgrading of anonymous accounts, defaults to NO. | ||
*/ | ||
@property(nonatomic, assign, getter=isAutoUpgradeAnonymousUsers) BOOL autoUpgradeAnonymousUsers; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: rename this to shouldAutoUpgradeAnonymousUsers
(for both getter and setter)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, done.
FIRUser *currentUser = self.authUI.auth.currentUser; | ||
// If the user is anonymous, delete the user to avoid dangling anonymous users. | ||
if (currentUser.isAnonymous) { | ||
[currentUser deleteWithCompletion:^(NSError * _Nullable error) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we no longer need to delete anonymous users?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We do, I just moved the code to the tableview cell. The reason is that I wanted to use the sign in button to trigger a sign-in when the current user was anonymous. Essentially I am separating anonymous sign in/out with "normal" sign in/out.
#403 is now merged, feel free to merge this PR as soon as travis tests pass. Thanks! |
Addresses comments Minor enhances Fixes bug where wrong error is returned
0667df0
to
ba5e708
Compare
* Add anonymous sign in upgrade * Returns merge error in the correct place. * Adds comments and minor changes * Adds correct error handling for linking errors * Addresses comments Addresses comments Minor enhances Fixes bug where wrong error is returned
Anonymous user upgrade federated accounts and phone auth.
Swift sample will be updated in a follow up PR.
Addresses #139