Bilibili App Auth

哔哩哔哩 App 端鉴权

Script này sẽ không được không được cài đặt trực tiếp. Nó là một thư viện cho các script khác để bao gồm các chỉ thị meta // @require https://update.greatest.deepsurf.us/scripts/566236/1754598/Bilibili%20App%20Auth.js

You will need to install an extension such as Tampermonkey, Greasemonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey to install this script.

You will need to install an extension such as Tampermonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey or Userscripts to install this script.

You will need to install an extension such as Tampermonkey to install this script.

You will need to install a user script manager extension to install this script.

(Tôi đã có Trình quản lý tập lệnh người dùng, hãy cài đặt nó!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(I already have a user style manager, let me install it!)

Tác giả
GabrielxD
Phiên bản
1.0.0
Đã tạo
14-02-2026
Đã cập nhật
14-02-2026
Kích thước
20 KB
Giấy phép
MIT

Bilibili App Auth

哔哩哔哩 App 端鉴权库

功能

  • 模拟 App 端请求签名(appkey / appsec + MD5 签名)
  • 内置多种 APP 预设:androidandroid_thingsthird_partytv(云视听小电视)、hd
  • 基于 EventTarget 的事件驱动扫码登录流程
  • 跨域请求封装(通过注入的 GM_xmlhttpRequest

快速上手

// ==UserScript==
// @require  https://update.greatest.deepsurf.us/scripts/566236/1754474/Bilibili%20App%20Auth.js
// @grant    GM_xmlhttpRequest
// @connect  passport.bilibili.com
// ==/UserScript==

const BilibiliAppAuth = createBilibiliAppAuth({ GM_xmlhttpRequest });
const bilibiliApp = new BilibiliAppAuth("tv"); // 使用 TV 端预设

事件

事件 触发时机 event.detail
start 获取到二维码后 -
scan 轮询中(等待扫码/已扫码) 轮询响应
completed 登录成功 登录响应数据
error 登录失败/二维码过期 错误响应
end 登录流程结束(成功或失败) 最终响应

Inspired from