Skip to content

Conversation

@jonbarrow
Copy link
Member

@jonbarrow jonbarrow commented Jan 2, 2026

Resolves #107 and #108

Changes:

Moves tokens to random data instead of storing the data directly. Trying to fit all the data inside the token was a losing battle because of how space-limited it all ways. This removes clients abilities to handle data entirely locally, but that's fine since it's only a single network hop. I made the tokens be the length of what they are from the official sources, despite the fact that some can sometimes be bigger, just to keep things simple

Marking as a draft because this isn't finished. The entire gRPC side needs to be done, which relies on PretendoNetwork/grpc#10 being merged. Also for gRPC, I think we should just ditch the v1 implementation entirely since it's token handling is fundementally incomaptible with this new handling. Just cut our losses there

Comment on lines +114 to +116
const oauthToken = await OAuthToken.findOne({
token: token
});

Check failure

Code scanning / CodeQL

Database query built from user-controlled sources High

This query object depends on a
user-provided value
.
This query object depends on a
user-provided value
.
@mrjvs
Copy link
Contributor

mrjvs commented Jan 2, 2026

I haven't checked token sizes in my review, will possibly need to be checked by someone else

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

Successfully merging this pull request may close these issues.

[Enhancement]: Store tokens in database

3 participants