File tree 1 file changed +9
-2
lines changed
Parse/Parse/Internal/User/AuthenticationProviders/Controller 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
56
56
PFParameterAssert (delegate, @" Authentication delegate can't be `nil`." );
57
57
PFParameterAssert (authType, @" `authType` can't be `nil`." );
58
58
59
- // If auth delete is already registered then unregister it gracefully
59
+ // If auth delete is already registered for provider
60
60
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
+
61
68
NSLog (@" unregistering existing deletegate to gracefully register new delegate for authType `%@ `." , authType);
62
69
[self unregisterAuthenticationDelegateForAuthType: authType];
63
70
}
64
-
71
+
65
72
dispatch_sync (_dataAccessQueue, ^{
66
73
self->_authenticationDelegates [authType] = delegate;
67
74
});
You can’t perform that action at this time.
0 commit comments