Giter Club home page Giter Club logo

bilibili-qr-login's Introduction

哔哩哔哩 cookie 获取工具

扫码登录获取B站 cookie,可与各种场景联动

iframe / window 模式

该工具可以通过 <iframe>window.open() 联动使用

  1. 编译时设置环境变量 TRUST_ORIGIN,值为你允许通过 <iframe>window.open() 调用的源,多个之间用英文逗号 , 分隔,例如 https://example.com,https://abc.example.com
    • 不设置时则无法正常使用 iframe / window 模式
    • 可设置为 *,允许所有页面调用,但不推荐,除非你知道这意味着什么
    • 在本地开发时若未提供则默认为 *
  2. 带上查询参数 mode=iframemode=window 进行使用(访问),然后监听 message 事件获取登陆成功后的 cookie

开发

要求 Node.js >= 18

# 安装依赖
yarn

# 开发
yarn dev

# 编译
yarn build

# 预览成品(需要先编译)
yarn preview # http://localhost:3000

bilibili-qr-login's People

Contributors

tsuk1ko avatar

Stargazers

 avatar W1ttF avatar  avatar

Forkers

dingmll

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.