diff --git a/Classes/BITAuthenticator.h b/Classes/BITAuthenticator.h index 8782ef67bd..dbca9c4a98 100644 --- a/Classes/BITAuthenticator.h +++ b/Classes/BITAuthenticator.h @@ -88,7 +88,13 @@ typedef void(^tValidationCompletion)(BOOL validated, NSError *error); */ @property (nonatomic, readonly) NSString *installationIdentification; -#pragma mark - HandleURL Helper +#pragma mark - UDID auth + +/** + * baseURL of the webpage the user is redirected to if authenticationType is BITAuthenticatorAuthTypeWebbased + * defaults to https://rink.hockeyapp.net but can be overwritten if desired + */ +@property (nonatomic, strong) NSURL *webpageURL; /** * should be used by the app-delegate to forward handle application:openURL:sourceApplication:annotation calls diff --git a/Classes/BITAuthenticator.m b/Classes/BITAuthenticator.m index 123c94c917..2019bc1427 100644 --- a/Classes/BITAuthenticator.m +++ b/Classes/BITAuthenticator.m @@ -30,7 +30,7 @@ static NSString* const kBITAuthenticatorLastAuthenticatedVersionKey = @"BITAuthe - (instancetype) initWithAppIdentifier:(NSString *)appIdentifier isAppStoreEnvironemt:(BOOL)isAppStoreEnvironment { self = [super initWithAppIdentifier:appIdentifier isAppStoreEnvironemt:isAppStoreEnvironment]; if( self ) { - + _webpageURL = [NSURL URLWithString:@"https://rink.hockeyapp.net/"]; } return self; } @@ -383,7 +383,7 @@ static NSString* const kBITAuthenticatorLastAuthenticatedVersionKey = @"BITAuthe - (void)authenticationViewControllerDidTapWebButton:(UIViewController *)viewController { - NSURL *hockeyWebbasedLoginURL = [self.hockeyAppClient.baseURL URLByAppendingPathComponent:[NSString stringWithFormat:@"apps/%@/authorize", self.encodedAppIdentifier]]; + NSURL *hockeyWebbasedLoginURL = [self.webpageURL URLByAppendingPathComponent:[NSString stringWithFormat:@"apps/%@/authorize", self.encodedAppIdentifier]]; [[UIApplication sharedApplication] openURL:hockeyWebbasedLoginURL]; }