0

I'm utilizing the facebook log in from Azure SDK, I'm utilizing the following code in a button:

-(void)fblogin
{
        [_azureService.client loginWithProvider:@"facebook" urlScheme:@"dribel" controller:self animated:YES completion:^(MSUser * _Nullable user, NSError * _Nullable error)
         {
             if (error)
             {
                 NSLog(@"Login failed with error: %@, %@", error, [error userInfo]);
             }
             else
             {
                 _azureService.client.currentUser = user;

                 NSLog(@"User logged in: %@", user.userId);


                 [self fblogin];
             }
         }];
    }

A webview like this, opens and does all the facebook log in process...

Stays Like this and doesn't go away

And when it ends, it calls the following method in the app delegate and since it's true, it resumes the log in flow...

- (BOOL)application:(UIApplication *)application openURL:(NSURL *)url options:(NSDictionary<UIApplicationOpenURLOptionsKey,id> *)options
{
    if ([[url.scheme lowercaseString] isEqualToString:@"dribel"])
    {
        // Resume login flow
        return [self.azureService.client resumeWithURL:url];
    }
    else {
        return NO;
    }
}

but the webview is supposed to be dismissed and after being dismissed the code is supposed to land on the else statement of the first piece of code, but it's not doing anything. I have to press done and lands on the if true statement and it says I canceled it. Does anyone has an idea of what could be wrong?

We have set up the external url in the azure portal to redirect to the correct appname:// so that's why it we get true in the app delegate. But what else is missing?

ycs.lrodz
  • 47
  • 6
  • if it is a open source sdk, debug it yourself. YOu need to dismis the safariview controller! – Teja Nandamuri Mar 03 '17 at 17:17
  • The azure documentation doesn't show anywhere where or how to dismiss it since it's being called from inside the azure framework, however their example "just works". I'm on a schedule for work and cannot spend time downloading an open source project and debugging to try to figure out something that should work according to their doc. Thanks for the reply tho. I'll check again or contact MS or see if there is a bug but I cannot work on other things during company work time. – ycs.lrodz Mar 03 '17 at 18:36

0 Answers0