Use datasyncIdToken as poTokenIdentity

This commit is contained in:
Brahim Hadriche committed 2026-06-25 15:47:26 -04:00
1 parent 6a4a61b61f
commit 5e798f19de
12 files changed
+132

No files matched your search

@@ -248,6 +248,7 @@ namespace Innertube
"accountByline": ParseText(accountItem["accountByline"])
"channelHandle": ParseText(accountItem["channelHandle"])
"activeIdentifyToken": ParseAccountItemIdentityToken(accountItem)
"selectActiveIdentityEndpoint": ValidAssociativeArray(ObjectUtils.Dig(accountItem, ["serviceEndpoint", "selectActiveIdentityEndpoint"]))
}
parsedAccounts.Push(parsedAccount)
end for
@@ -297,6 +298,26 @@ namespace Innertube
return ""
end function
function GetDatasyncIdToken(selectActiveIdentityEndpoint as object) as string
supportedTokens = ObjectUtils.Dig(selectActiveIdentityEndpoint, ["supportedTokens"])
if not IsArray(supportedTokens)
return ""
end if
for each supportedToken in supportedTokens
if not IsAssociativeArray(supportedToken)
continue for
end if
datasyncIdToken = ObjectUtils.Dig(supportedToken, ["datasyncIdToken", "datasyncIdToken"])
if not StringUtils.IsNullOrEmpty(datasyncIdToken)
return datasyncIdToken
end if
end for
return ""
end function
function ToCamelCase(obj as object) as object
if not IsAssociativeArray(obj)
return obj