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
Bluesky: store access/refresh tokens instead of creating a new session on every request #1584
Comments
|
Hmm, I take it back, the rate limit might not be per user, I'm seeing it on other user pages too. Funny. |
|
I just hit it too :/ Storing access tokens is kind of a pain because they're very short lived, do we have a notion of a cache with eviction times rather than putting it in the DB? |
|
Oh, we'd store and use the refresh token too. I think I see how we'd do this one, I'm happy to take it unless you disagree. |
|
Please do! I'm interested to see what the problem actually ends up being here, I never once hit a rate limit locally and I was hammering it a lot harder than I did the real thing |
|
For posterity, the rate limit we're hitting is |
and let lexprc manage and refresh sessions. for #1584
|
Done! |
Lol. My user page https://brid.gy/bluesky/did:plc:fdme4gb7mu7zrie7peay7tst currently shows
HTTP Error 429: {"error":"RateLimitExceeded","message":"Rate Limit Exceeded"}because we log in (ie callcreateSession) with username and app password on every request instead of storing the access token and using it in subsequent sessions. Funny.cc @JoelOtter. Hopefully not too hard to fix. And not that urgent, I think the rate limit is per user, and I expect I hit it because I was running discover on a bunch of my old posts.
The text was updated successfully, but these errors were encountered: