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

client.clone() does not properly clone session #371

Closed
MarshalX opened this issue Aug 31, 2024 · 0 comments · Fixed by #531
Closed

client.clone() does not properly clone session #371

MarshalX opened this issue Aug 31, 2024 · 0 comments · Fixed by #531
Labels
bug Something isn't working

Comments

@MarshalX
Copy link
Owner

MarshalX commented Aug 31, 2024

The clone method clones HTTP headers including the current access token, but does nothing with the refresh token. So the bug will rise when exp of clones instance passes. The client will not be able to refresh the session automatically.

The correct fix is not only about coping session-related fields. We need something shared between all clones. Because client A (original) could refresh the token on some request. This will invalidate refresh token. The client B (clone of A) will not be able to refresh the token because the refresh token was used already. And the new one only belongs to client A... Tokens should be shared between all clones.

This affects all methods that use .clone():

  • with_labelers
  • with_bsky_labeler
  • with_proxy
  • with_bsky_chat_proxy
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant