mirror of
https://github.com/revanced/revanced-patches.git
synced 2025-05-31 05:50:25 +02:00
feat(Spotify): Add Fix Facebook login
patch (#5023)
This commit is contained in:
parent
c89f2bc9b8
commit
34932dc439
@ -1,3 +1,7 @@
|
||||
public final class FixFacebookLoginPatchKt {
|
||||
public static final fun getFixFacebookLoginPatch ()Lapp/revanced/patcher/patch/BytecodePatch;
|
||||
}
|
||||
|
||||
public final class app/revanced/patches/all/misc/activity/exportall/ExportAllActivitiesPatchKt {
|
||||
public static final fun getExportAllActivitiesPatch ()Lapp/revanced/patcher/patch/ResourcePatch;
|
||||
}
|
||||
|
@ -7,7 +7,5 @@ import app.revanced.patcher.patch.bytecodePatch
|
||||
val spoofSignaturePatch = bytecodePatch(
|
||||
description = "Spoofs the signature of the app fix various functions of the app.",
|
||||
) {
|
||||
compatibleWith("com.spotify.music")
|
||||
|
||||
dependsOn(spoofPackageInfoPatch)
|
||||
}
|
||||
|
@ -0,0 +1,13 @@
|
||||
package app.revanced.patches.spotify.misc.fix.login
|
||||
|
||||
import app.revanced.patcher.fingerprint
|
||||
import app.revanced.util.literal
|
||||
|
||||
internal val katanaProxyLoginMethodHandlerClassFingerprint = fingerprint {
|
||||
strings("katana_proxy_auth")
|
||||
}
|
||||
|
||||
internal val katanaProxyLoginMethodTryAuthorizeFingerprint = fingerprint {
|
||||
strings("e2e")
|
||||
literal { 0 }
|
||||
}
|
@ -0,0 +1,29 @@
|
||||
package app.revanced.patches.spotify.misc.fix.login
|
||||
|
||||
import app.revanced.patcher.patch.bytecodePatch
|
||||
import app.revanced.util.returnEarly
|
||||
|
||||
@Suppress("unused")
|
||||
val fixFacebookLoginPatch = bytecodePatch(
|
||||
name = "Fix Facebook login",
|
||||
description =
|
||||
"Fix logging in with Facebook when the app is patched by always opening the login in a web browser window.",
|
||||
) {
|
||||
compatibleWith("com.spotify.music")
|
||||
|
||||
execute {
|
||||
// The Facebook SDK tries to handle the login using the Facebook app in case it is installed.
|
||||
// However, the Facebook app does signature checks with the app that is requesting the authentication,
|
||||
// which ends up making the Facebook server reject with an invalid key hash for the app signature.
|
||||
// Override the Faceboook SDK to always handle the login using the web browser, which does not perform
|
||||
// signature checks.
|
||||
|
||||
val katanaProxyLoginMethodHandlerClass = katanaProxyLoginMethodHandlerClassFingerprint.originalClassDef
|
||||
// Always return 0 (no Intent was launched) as the result of trying to authorize with the Facebook app to
|
||||
// make the login fallback to a web browser window.
|
||||
katanaProxyLoginMethodTryAuthorizeFingerprint
|
||||
.match(katanaProxyLoginMethodHandlerClass)
|
||||
.method
|
||||
.returnEarly(0)
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user