Coder Social home page Coder Social logo

asoulcnkioauthfrontend's Introduction

AsoulCnkiOAuthFrontend

简述

为 b 站提供第三方 oauth 服务
尽量保持打包产物的精简以提升用户体验
打包采用 vite 进行,css 使用 tailwindcss

接入示例

跳转到https://aaa.com/?redirect_uri=https://www.bbb.com,

用户成功授权后 oauth 系统将跳转到回调页面,并通过锚点的形式传递 token.

此例中将跳转到https://www.bbb.com/#token=qf4z12s2gsuu0o4l

获取到 token 后可参照后端 api 说明获取用户信息

API 说明

获取新的 token

token 需要用户发私信验证之后才能正常使用,未绑定的 token 两分钟会过期

GET /verify

鉴权

只要不是 DELETE 都可以用

GET /verify

Authorization: token

返回值

名称 解释
code 为 0 时,验证成功
message 报错信息,默认为 ok
uid 和对应用户的 uid

取消授权

DELETE /verify

Authorization: token

返回值

名称 解释
code 为 0 时,验证成功
message 报错信息,默认为 ok

安装

npm install

运行 && 打包

启动开发机

npm run dev

构建

npm run build

本地预览构建产物

npm run serve

asoulcnkioauthfrontend's People

Contributors

ch3cknull avatar yllhwa avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

asoulcnkioauthfrontend's Issues

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.