bluebubbles-server icon indicating copy to clipboard operation
bluebubbles-server copied to clipboard

V2 API with Tokens!

Open juliettebee opened this issue 2 years ago • 1 comments

Hiya! So I noticed BlueBubbles doesn't use tokens and has the interesting design choice of using url params instead of headers so I created a version 2 of the API with user created tokens! This is very much a proof of concept, it has not been thoroughly tested, it was hacked together in 4 hours. This is the first time I've written in Typescript so lemme know if something's wrong!

Changes:

  • Token panel in settings
  • V2 API requiring a Token header with the value of [token name] [token password]
  • Two new API routes
    • token/register POST {"name": "token name", "password": "token password"}
    • token/delete POST {"name": "token name"}

juliettebee avatar Nov 21 '23 05:11 juliettebee

Added route: token/refresh POST {"name": "token name", "password": "token password", expireAt: 0} Where expireAt is how much longer to add to the expiration in Unix time:)

juliettebee avatar Nov 21 '23 23:11 juliettebee

Sorry I havent looked into this yet. I'm waiting for the right time to properly implement it

zlshames avatar Mar 09 '24 14:03 zlshames