Q:

SoundCloud OSX Oauth process doesn't create account unless cancelled

I've been trying to use the CocoaSoundCloudAPI to create a basic desktop app for OSX in Cocoa. 
I'm struggling with authentication. Clicking a login button opens up an external browser window that tries to give my app authentication. If I click "Connect" the connect button shows a lovely animation... forever, and [SCSoundCloud account] is null. 
However, if I click "Cancel" in the external browser window during this process, I see that SCAccount becomes !nil
Can anyone explain this?
Here's my code:
#import "SCMAppDelegate.h"

@implementation SCMAppDelegate

+ (void)initialize
{
    [SCSoundCloud setClientID:@"MYID"
                       secret:@"MYSECRET"
                  redirectURL:[NSURL URLWithString:@"sampleproject1://oauth"]];

}

- (IBAction)login:(id)sender
{
    [SCSoundCloud requestAccessWithPreparedAuthorizationURLHandler:^(NSURL *preparedURL){
        // Load the URL in a web view or open it in an external browser
        [[NSWorkspace sharedWorkspace] openURL:preparedURL];
    }];
}

- (void)applicationDidFinishLaunching:(NSNotification *)aNotification;
{
    [[NSAppleEventManager sharedAppleEventManager] setEventHandler:self
                                                       andSelector:@selector(handleURLEvent:withReplyEvent:)
                                                     forEventClass:kInternetEventClass
                                                        andEventID:kAEGetURL];
}

- (void)handleURLEvent:(NSAppleEventDescriptor*)event
        withReplyEvent:(NSAppleEventDescriptor*)replyEvent;
{
    NSString* url = [[event paramDescriptorForKeyword:keyDirectObject] stringValue];

    BOOL handled = [SCSoundCloud handleRedirectURL:[NSURL URLWithString:url]];
    if (!handled) {
        NSLog(@"The URL (%@) could not be handled by the SoundCloud API. Maybe you want to do something with it.", url);
    }

    NSLog(@"This is the account: %@", [SCSoundCloud account]);
}

@end

I've been using https://github.com/soundcloud/CocoaSoundCloudAPI/blob/master/GeneralUsage.md as a guide, and have found most things to work. Can anyone push me in the right direction?

A:

I did some NSLogging and found that, in fact, I was receiving a valid SoundCloud Account object, it just needed some more time to receive the object back. 
I was, however, surprised that my external browser window never received a notification to indicate that connection had completed - is this an error on my behalf or a regular occurrence when it comes to external oauth2 requests? 

It seems that, even if I use Facebook authorisation with my app, I never get notified in the browser page that authentication has completed. Does anyone know how I can achieve this? I'm quite sure that my callback url is correct, but I'll keep trying...

