Browser based potokens

This commit is contained in:
Brahim Hadriche committed 2026-06-26 13:06:51 -04:00
1 parent 5e798f19de
commit 63f9ac693a
27 files changed
+722 -499

No files matched your search

@@ -775,6 +775,20 @@ namespace InnertubeService
return Innertube.GetDatasyncIdToken(endpoint)
end function
' The identity used to bind GVS poTokens: the signed-in profile's datasyncIdToken,
' falling back to visitorData when logged out (or when no datasyncIdToken is available).
function GetCurrentPoTokenIdentity(profilesService as object, innertubeNode as object) as string
currentProfile = profilesService.currentProfile
if currentProfile <> invalid and currentProfile.type = "youtube"
accessToken = currentProfile.accessToken
if not StringUtils.IsNullOrEmpty(accessToken)
' Signed in: bind to the datasyncIdToken, matching the decipher request's identity.
return GetProfileDatasyncIdToken(currentProfile, accessToken, profilesService, invalid)
end if
end if
return innertubeNode.visitorData
end function
function BackfillSelectActiveIdentityEndpoint(profileNode as object, accessToken as string, profilesService as object, cancellation as object) as object
LogInfo("Backfilling selectActiveIdentityEndpoint for signed-in profile")
accounts = Innertube.ListAccounts(accessToken, cancellation)