fix Google sign in, again. Thanks to @AhmedBafkir and @kkirby - https://gist.github.com/AhmedBafkir/0c16b806b3fb233995aa01b93da44f93
This commit is contained in:
+28
-4
@@ -49,6 +49,7 @@ static NSString *accessGroupID() {
|
||||
return accessGroup;
|
||||
}
|
||||
|
||||
//
|
||||
BOOL hideHUD() {
|
||||
return [[NSUserDefaults standardUserDefaults] boolForKey:@"hideHUD_enabled"];
|
||||
}
|
||||
@@ -482,6 +483,30 @@ BOOL replacePreviousAndNextButton() {
|
||||
}
|
||||
%end
|
||||
|
||||
// Fix "Google couldn't confirm this attempt to sign in is safe. If you think this is a mistake, you can close and try again to sign in" - qnblackcat/uYouPlus#420
|
||||
// Thanks to @AhmedBafkir and @kkirby - https://github.com/qnblackcat/uYouPlus/discussions/447#discussioncomment-3672881
|
||||
%group gFixGoogleSignIn
|
||||
%hook SSORPCService
|
||||
+ (id)URLFromURL:(id)arg1 withAdditionalFragmentParameters:(NSDictionary *)arg2 {
|
||||
NSURL *orig = %orig;
|
||||
NSURLComponents *urlComponents = [[NSURLComponents alloc] initWithURL:orig resolvingAgainstBaseURL:NO];
|
||||
NSMutableArray *newQueryItems = [urlComponents.queryItems mutableCopy];
|
||||
for (NSURLQueryItem *queryItem in urlComponents.queryItems) {
|
||||
if ([queryItem.name isEqualToString:@"system_version"]
|
||||
|| [queryItem.name isEqualToString:@"app_version"]
|
||||
|| [queryItem.name isEqualToString:@"kdlc"]
|
||||
|| [queryItem.name isEqualToString:@"kss"]
|
||||
|| [queryItem.name isEqualToString:@"lib_ver"]
|
||||
|| [queryItem.name isEqualToString:@"device_model"]) {
|
||||
[newQueryItems removeObject:queryItem];
|
||||
}
|
||||
}
|
||||
urlComponents.queryItems = [newQueryItems copy];
|
||||
return urlComponents.URL;
|
||||
}
|
||||
%end
|
||||
%end
|
||||
|
||||
// Fix "You can't sign in to this app because Google can't confirm that it's safe" warning when signing in. by julioverne & PoomSmart
|
||||
// https://gist.github.com/PoomSmart/ef5b172fd4c5371764e027bea2613f93
|
||||
// https://github.com/qnblackcat/uYouPlus/pull/398
|
||||
@@ -508,7 +533,6 @@ BOOL replacePreviousAndNextButton() {
|
||||
+ (NSString *)accessGroup {
|
||||
return accessGroupID();
|
||||
}
|
||||
|
||||
+ (NSString *)sharedAccessGroup {
|
||||
return accessGroupID();
|
||||
}
|
||||
@@ -898,7 +922,7 @@ static void replaceTab(YTIGuideResponse *response) {
|
||||
if (@available(iOS 16, *)) {
|
||||
%init(iOS16);
|
||||
}
|
||||
// if (!fixGoogleSigin()) {
|
||||
// %init(gDevice_challenge_request_hack);
|
||||
// }
|
||||
if (!fixGoogleSigin()) {
|
||||
%init(gFixGoogleSignIn);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user