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

Account being logged out #288

Open
Somberor opened this issue Jan 14, 2025 · 2 comments
Open

Account being logged out #288

Somberor opened this issue Jan 14, 2025 · 2 comments

Comments

@Somberor
Copy link

Does anyone else has an issue when his account is being logged out after some time and the session of ct0 and auth_token is not working anymore and requires relogin?

@cmj
Copy link

cmj commented Jan 15, 2025

I've been trying to nail this down for a while. I manage many accounts, some old, some new, and it seems like newer accounts have their auth_tokens revoked every 30 days. My RSS CGI script cycles through roughly 10 accounts and only the newer ones have issues, as with providing new accounts with Nitter instances (using cookies, not oauth_tokens).

I use the v1/verify_credentials endpoint and pass the auth_token to it to verify if it's still valid. I think it's a pretty simple call to check if the token is valid; or just use any 401 and use that to re-auth. It would also have to check if the account is suspended, which verify_credentials does.

Here's a basic example https://github.com/cmj/twitter-tools/blob/main/auth/verify_credentials.sh

That said, I think any account that doesn't show activity these days within a 30-day period will have to re-auth. Presumably their bot-mitigation stuff.

@Somberor
Copy link
Author

Somberor commented Jan 15, 2025 via email

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

2 participants