Skip to content

FishPiOffical/OAuth-local-test

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 

Repository files navigation

OAuth-local-test

鱼排 OAuth 本地调试脚本。

环境

  • Node.js 18+
  • 可访问的鱼排 OAuth 服务

启动

npm start

也可以直接运行:

node oauth-local-test.mjs

启动后打开:

http://localhost:3100

默认回调地址:

http://localhost:3100/callback

配置

可通过环境变量调整地址、端口和权限范围。

变量 默认值 说明
FISHPI_OAUTH_PROVIDER http://localhost:8080 鱼排 OAuth 服务地址
OAUTH_TEST_PORT 3100 本地端口
OAUTH_TEST_CLIENT http://localhost:3100 本地访问地址
OAUTH_TEST_SCOPE profile.read points.read articles.read 授权范围

示例:

FISHPI_OAUTH_PROVIDER=https://fishpi.cn OAUTH_TEST_PORT=3100 npm start

PowerShell:

$env:FISHPI_OAUTH_PROVIDER="https://fishpi.cn"
$env:OAUTH_TEST_PORT="3100"
npm start

功能

  • 发起授权
  • 接收回调
  • 校验结果
  • 刷新令牌
  • 查看用户、积分、帖子

文档

About

鱼排的OAuth本地调试脚本

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors