Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(Fix) Remove Device Challenge #12

Closed
iammanpreetsingh opened this issue Aug 21, 2022 · 2 comments
Closed

(Fix) Remove Device Challenge #12

iammanpreetsingh opened this issue Aug 21, 2022 · 2 comments

Comments

@iammanpreetsingh
Copy link

Add this in your tweak. This Allow sideloaded iOS YouTube app to sign in by removing device_challenge_request from the sign in payload.

// 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
@ginsudev
Copy link
Collaborator

I've already added it in a private build. I'll post it today

@iammanpreetsingh
Copy link
Author

After adding this in 1.1.7, I have to login into my Google Account each time I open the app. I will have to use v1.1.6 unfortunately.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants