Created
August 21, 2022 12:10
-
-
Save PoomSmart/ef5b172fd4c5371764e027bea2613f93 to your computer and use it in GitHub Desktop.
Allow sideloaded iOS YouTube app to sign in by removing device_challenge_request from the sign in payload.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Credit: https://github.com/qnblackcat/uYouPlus/pull/398 | |
%hook SSOService | |
+ (id)fetcherWithRequest:(NSMutableURLRequest *)request configuration:(id)configuration { | |
if ([request isKindOfClass:[NSMutableURLRequest class]] && request.HTTPBody) { | |
NSError *error = nil; | |
NSMutableDictionary *body = [NSJSONSerialization JSONObjectWithData:request.HTTPBody options:NSJSONReadingMutableContainers error:&error]; | |
if (!error && [body isKindOfClass:[NSMutableDictionary class]]) { | |
[body removeObjectForKey:@"device_challenge_request"]; | |
request.HTTPBody = [NSJSONSerialization dataWithJSONObject:body options:kNilOptions error:&error]; | |
} | |
} | |
return %orig; | |
} | |
%end |
Can this be made into a separate tweak/deb?
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Just checked it and you are right! Even with this tweak injected it doos not work