是不是可以实现一个油猴脚本,通过refresh token获取access token实现 new.oaifree.com 的自动登录

或许可以通过share token实现?
rt → at → st

# rt 换  at
curl -X POST https://token.oaifree.com/api/auth/refresh \
     -H "Content-Type: application/x-www-form-urlencoded" \
     -d "refresh_token=xxxxx"

# at 生成 st
curl 'https://chat.oaifree.com/token/register' \
  -H 'content-type: application/x-www-form-urlencoded; charset=UTF-8' \
  --data-raw "unique_name=$(openssl rand -hex 8)" \
  --data-raw 'access_token=xxxxx' \
  --data-raw 'expires_in=0' \
  --data-raw 'site_limit=' \
  --data-raw 'gpt35_limit=-1' \
  --data-raw 'gpt4_limit=-1' \
  --data-raw 'show_conversations=true'


# st 登录
https://new.oaifree.com/auth/login_share?token=fk-xxxx

更新可以通过st返回的时间错 expire_at 判断

4 Likes