GithubHelp home page GithubHelp logo

tms's Introduction

Token Management System (TMS)

A centralised system to manage PTC tokens

Keep track of your PTC tokens so you don't have to make unnecessary authentication requests.

Requirements:

  • Node.js (tested with Node.js 21 but earlier versions should work).
  • A 3rd party tool to get the login_code from PTC. Currently the only working public tool is Xilriws.
  • MySQL 8.

Instructions:

  • git clone https://github.com/RubWalter/tms.git && cd tms && npm i
  • cp config/default.sample.json config/default.json
  • Make changes to config/default.json:
    • Fill in your database details
    • ptc_auth_url: your Xilriws url
    • refresh_token_keep_alive.enabled: set to true to renew refresh tokens automatically before it expires.
    • refresh_token_keep_alive.max_age_days: only renew tokens older than xx days.
    • Please leave interval_seconds, request_sleep_seconds and tokens_per_interval as they are unless you have read the code and know what you're doing.
  • If you want to use proxies:
    • cp config/proxies.sample.txt config/proxies.txt
    • Fill in your proxies details. Proxies will be also be handed to Xilriws.
  • Run it: node index.js
  • If your MITM software asks for a url, use http://IP_ADDRESS:9999/access_token

It's recommeded to run this via pm2.

pm2 start index.js --name tms

Contact

rubw on Discord, but don't expect me to handhold you.

Important note

  • The refresh tokens are valid for 30 days from the last_refreshed timestamp, but it can be renewed indefintely if used within that period. Please keep TMS running even if your MITM/controller is not running to keep tokens alive as long as possible.
  • Do not log in with the accounts anywhere else, manually or automatic. It will invalidate that account's token in TMS.

tms's People

Contributors

rubwalter avatar

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.