File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed
Parse/Parse/Internal/User/AuthenticationProviders/Controller Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -56,12 +56,19 @@ - (void)registerAuthenticationDelegate:(id<PFUserAuthenticationDelegate>)delegat
5656 PFParameterAssert (delegate, @" Authentication delegate can't be `nil`." );
5757 PFParameterAssert (authType, @" `authType` can't be `nil`." );
5858
59- // If auth delete is already registered then unregister it gracefully
59+ // If auth delete is already registered for provider
6060 if ([self authenticationDelegateForAuthType: authType]) {
61+
62+ // If same auth delete is already registered then don't register it again
63+ if ([self authenticationDelegateForAuthType: authType] == delegate) {
64+ NSLog (@" skipping registering as same delegate already registered for authType `%@ `." , authType);
65+ return ;
66+ }
67+
6168 NSLog (@" unregistering existing deletegate to gracefully register new delegate for authType `%@ `." , authType);
6269 [self unregisterAuthenticationDelegateForAuthType: authType];
6370 }
64-
71+
6572 dispatch_sync (_dataAccessQueue, ^{
6673 self->_authenticationDelegates [authType] = delegate;
6774 });
You can’t perform that action at this time.
0 commit comments