@@ -24,7 +24,7 @@ - (dispatch_queue_t)methodQueue
24
24
return dispatch_get_main_queue ();
25
25
}
26
26
27
- UIBackgroundTaskIdentifier taskId ;
27
+ UIBackgroundTaskIdentifier rnAppAuthTaskId ;
28
28
29
29
/* ! @brief Number of random bytes generated for the @ state.
30
30
*/
@@ -305,9 +305,9 @@ - (void)authorizeWithConfiguration: (OIDServiceConfiguration *) configuration
305
305
appDelegate.authorizationFlowManagerDelegate = self;
306
306
__weak typeof (self) weakSelf = self;
307
307
308
- taskId = [UIApplication.sharedApplication beginBackgroundTaskWithExpirationHandler: ^{
309
- [UIApplication.sharedApplication endBackgroundTask: taskId ];
310
- taskId = UIBackgroundTaskInvalid;
308
+ rnAppAuthTaskId = [UIApplication.sharedApplication beginBackgroundTaskWithExpirationHandler: ^{
309
+ [UIApplication.sharedApplication endBackgroundTask: rnAppAuthTaskId ];
310
+ rnAppAuthTaskId = UIBackgroundTaskInvalid;
311
311
}];
312
312
313
313
UIViewController *presentingViewController = appDelegate.window .rootViewController .view .window ? appDelegate.window .rootViewController : appDelegate.window .rootViewController .presentedViewController ;
@@ -318,8 +318,8 @@ - (void)authorizeWithConfiguration: (OIDServiceConfiguration *) configuration
318
318
callback: ^(OIDAuthorizationResponse *_Nullable authorizationResponse, NSError *_Nullable error) {
319
319
typeof (self) strongSelf = weakSelf;
320
320
strongSelf->_currentSession = nil ;
321
- [UIApplication.sharedApplication endBackgroundTask: taskId ];
322
- taskId = UIBackgroundTaskInvalid;
321
+ [UIApplication.sharedApplication endBackgroundTask: rnAppAuthTaskId ];
322
+ rnAppAuthTaskId = UIBackgroundTaskInvalid;
323
323
if (authorizationResponse) {
324
324
resolve ([self formatAuthorizationResponse: authorizationResponse withCodeVerifier: codeVerifier]);
325
325
} else {
@@ -334,8 +334,8 @@ - (void)authorizeWithConfiguration: (OIDServiceConfiguration *) configuration
334
334
NSError *_Nullable error) {
335
335
typeof (self) strongSelf = weakSelf;
336
336
strongSelf->_currentSession = nil ;
337
- [UIApplication.sharedApplication endBackgroundTask: taskId ];
338
- taskId = UIBackgroundTaskInvalid;
337
+ [UIApplication.sharedApplication endBackgroundTask: rnAppAuthTaskId ];
338
+ rnAppAuthTaskId = UIBackgroundTaskInvalid;
339
339
if (authState) {
340
340
resolve ([self formatResponse: authState.lastTokenResponse
341
341
withAuthResponse: authState.lastAuthorizationResponse]);
0 commit comments