BTHLABS-66: Prepping for public release: Take three

I smell a drastic change to auth flow in the Mac app... Let's see if it
gets approved this time :D.
This commit is contained in:
2025-11-21 20:25:02 +01:00
parent 9abed01e53
commit 23f8296659
11 changed files with 89 additions and 36 deletions

View File

@@ -109,6 +109,8 @@
}
-(BOOL)handleAuthParams:(HPAuthParams *)authParams {
[[NSNotificationCenter defaultCenter] postNotificationName:@"AuthFlowDidReceiveAuthParams" object:self];
HPRPCClient *rpcClient = [[HPRPCClient alloc] initWithBaseURL:self.baseURL accessToken:nil];
NSArray *callParams = @[
@@ -120,7 +122,7 @@
method:@"accounts.access_tokens.create"
params:callParams endopoint:@"/accounts/rpc/"
completionHandler:^(NSString *callId, HPRPCCallResult *result) {
dispatch_async(dispatch_get_main_queue(), ^{
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(1 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
if (result.error != nil) {
NSLog(@"-[HPAuthFlow handleAuthParams:] error=`%@`", result.error);
} else {