MCPcopy Index your code
hub / github.com/smallfawn/QLScriptPublic / loginByCode

Function loginByCode

wxapp/qqpcmgr.js:161–193  ·  view source on GitHub ↗
(authCode, guid)

Source from the content-addressed store, hash-verified

159}
160
161async function loginByCode(authCode, guid) {
162 const { data } = await axios.request({
163 method: "POST",
164 url: "https://jprx.m.qq.com/data/3078/forward",
165 headers: {
166 "User-Agent": USER_AGENT,
167 Accept: "application/json, text/plain, */*",
168 "Content-Type": "application/json",
169 "sec-ch-ua": '"Chromium";v="109"',
170 "sec-ch-ua-mobile": "?0",
171 "sec-ch-ua-platform": '"Windows"',
172 Origin: "https://webcdn.m.qq.com",
173 "Sec-Fetch-Site": "same-site",
174 "Sec-Fetch-Mode": "cors",
175 "Sec-Fetch-Dest": "empty",
176 Referer: "https://webcdn.m.qq.com/",
177 "Accept-Language": "zh-CN,zh;q=0.9",
178 },
179 data: {
180 req: {
181 platType: 3,
182 loginAccType: 32,
183 authCode,
184 clientGuid: guid,
185 },
186 },
187 timeout: 20000,
188 validateStatus: () => true,
189 });
190 const payload = findLoginPayload(data);
191 if (!payload) throw new Error(`登录响应未找到 loginKey/openid: ${JSON.stringify(data)}`);
192 return payload;
193}
194
195function normalizeProfile(payload, guid) {
196 const third = payload.thirdPartyAccInfo || {};

Callers 1

runAccountFunction · 0.70

Calls 2

findLoginPayloadFunction · 0.85
requestMethod · 0.45

Tested by

no test coverage detected