Page MenuHomePhabricator

Refresh Transkribus credentials when expired
Open, Needs TriagePublicBUG REPORT

Description

It appears that the Transkribus credentials do expire after some amount of time, so either we're storing them wrong, or we need to refresh them at some interval (a month?). This task is to investigate the best fix, and implement it.

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript
Samwilson renamed this task from Refresh credentials when expired to Refresh Transkribus credentials when expired.May 21 2023, 10:37 AM

I checked the existing documentation we have here T326388, and from the last comment it looks like the refresh tokens expire when not used for 30 days. I don't think that is the case, though? Because the engine has been in use on multiple Wikisources since it was made available.

I feel we should confirm this bit of information before we start searching for a suitable fix for the issue.

I agree. I wonder if it's expiring after 30 days regardless of usage?

We could update the app:transkribus command to also update the .env.local file, and then run it in a monthly cronjob. Is that a bit too hacky? Actually, to do that we'd have to store the password somewhere anyway, so perhaps it'd be better to store the password in the .env.local file, and then cache the access token and secret and use them from the cache.