You've already forked hotpocket
BTHLABS-58: Fixing URL paths resolution to avoid double slashes
This commit is contained in:
@@ -10,6 +10,7 @@
|
||||
#import "HPAPI.h"
|
||||
#import "HPCredentialsHelper.h"
|
||||
#import "HPRPCClient.h"
|
||||
#import "NSURL+HotPocketExtensions.h"
|
||||
|
||||
@implementation HPAuthParams
|
||||
|
||||
@@ -26,15 +27,14 @@
|
||||
return nil;
|
||||
}
|
||||
|
||||
NSURL *authURL = [self.baseURL URLByAppendingPathComponent:@"/integrations/extension/authenticate/"];
|
||||
|
||||
if (authURL.scheme == nil) {
|
||||
if (self.baseURL.isUsableInHotPocket == NO) {
|
||||
return nil;
|
||||
}
|
||||
|
||||
NSBundle *mainBundle = [NSBundle mainBundle];
|
||||
|
||||
NSURLComponents *authURLComponents = [NSURLComponents componentsWithURL:authURL resolvingAgainstBaseURL:NO];
|
||||
NSURLComponents *authURLComponents = [NSURLComponents componentsWithURL:self.baseURL resolvingAgainstBaseURL:NO];
|
||||
authURLComponents.path = @"/integrations/extension/authenticate/";
|
||||
authURLComponents.queryItems = @[
|
||||
[NSURLQueryItem queryItemWithName:@"source" value:[[mainBundle infoDictionary] valueForKey:@"HPAuthFlowSource"]],
|
||||
[NSURLQueryItem queryItemWithName:@"session_token" value:self.sessionToken],
|
||||
|
||||
Reference in New Issue
Block a user