Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switch to osu! API v2 #54

Open
TicClick opened this issue Jan 6, 2024 · 2 comments
Open

Switch to osu! API v2 #54

TicClick opened this issue Jan 6, 2024 · 2 comments

Comments

@TicClick
Copy link
Owner

TicClick commented Jan 6, 2024

No description provided.

@TicClick
Copy link
Owner Author

TicClick commented Feb 4, 2024

this one is going to take a lot of time. osu! API v2 requires OAuth, which in case of osu! means perishable authentication tokens -- if I recall correctly, they expire after 86,400 seconds (24 hours).

kind of torn here, since if I want to keep the client effortless to use, I need to write and host a small server which does two things:

  1. handle OAuth authentication flow and refresh the tokens on users' behalf -- sure, it could run on localhost instead (as I did in https://github.com/TicClick/coral, since it only needs to pick up a token from a redirect URL), but very few people will keep their PCs up and running for more than 24 hours. that means that an API token once issued will expire
  2. handle token requests from clients, which means I need to add my own authentication layer, similarly to what other applications do to avoid requiring users to log in every time:
    • stable: keeps a password hash locally
    • lazer: does something similar I believe (password hash/non-expiring token tied to a device)
    • IRC: uses a constant plaintext password for authentication
    • some smart web apps: do just what I described (secure a token, refresh it server-side)

@TicClick
Copy link
Owner Author

TicClick commented May 25, 2024

https://github.com/TicClick/relay

  • report the session identifier back to steel after generation
  • allow fetching osu! API tokens from steel based on session identifier
  • add rate limiting
  • add token refreshing routine

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant