⚠️ Important Access Tokens Updates - effective March 4, 2025 #495
Replies: 7 comments 24 replies
-
I'd say 2 hours is a bit harsh? I think even PayPal has it set for like 10 hours or so. Anyway it would be nice to have a longer time to react with such changes. I'm talking for like 1 month+. 11 Feb is in 5 days. If someone does need to react and make changes in their code (for example iOS app) it can take 5 days to let alone pass the apple review. Not even counting update propagation time across all users devices which takes many more days. I do not think there is remote chance this change information will reach all interested parties anyway in the first place. |
Beta Was this translation helpful? Give feedback.
-
I'd also like to have more time to test — and more than probably have fixes for — this 😅 And, if possible, could you make that change on Staging? Maybe even set something like 20 minutes on Staging so we can test in different conditions (app coming back from background after token expiration, app is in foreground while the token expires, background processes, widgets 😬,...) faster. |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
Heya, I just received the token update email. I'm using Trakt for a side project and just had a recurring quarterly calendar event to manually refresh my access token so it's a good incentive to finally automate that 😉 I was wondering if the refresh tokens are infinite or if a new one is served with every new access token? |
Beta Was this translation helpful? Give feedback.
-
Currently, we can refresh tokens in the background without impacting the user. However, with the new changes, there is no longer enough time for this. If a user logs in daily, the token will likely be expired every time, and there are two options: This approach would require significantly more work compared to the current implementation. |
Beta Was this translation helpful? Give feedback.
-
How is this going to affect using Apple's Shortcuts app to log films? I currently have a shortcut with the token manually pasted into a text field which then passes it through to the rest of the shortcut as a variable. I have a reminder to refresh this every 3 months but I can't do this every time I want to log a movie. This is really important to me as I use a shortcut from Letterboxd to log a film I've just reviewed on the platform. I'm guessing this just completely kills my shortcut? |
Beta Was this translation helpful? Give feedback.
-
I'm currently testing a new implementation in Rippple that seem to work okay 👌 I've been doing a lot of testing this weekend. It took several attempts like:
Those two ended up with a lot of headaches because one was synchronous, the other asynchronous and both were at some time deadlocking everything or breaking the refresh token rotation. As I said above, the hard part is multi-threads, multi-processes, everything all the time all at once. Also taking into account relying on the stability of the internet connection, the backend, the local&secured storage,... is also not always 100% possible. Because my Widget can't refresh the token (for reasons explained above and more), my final strategy is to refresh the token when the user "opens" the app and after only 1h after the creation date (or less if the validity one day comes lower than 1h but I hope not because it will kill the Widget for sure).
Hope the 1h refresh is okay from Trakt point of view. My guess is, yes, since it won't practically be every 1h AND it is close to the 2h actual validity that was the first plan 😊 |
Beta Was this translation helpful? Give feedback.
-
access_token
will expire in 24 hours, instead of 3 months.Why are we reducing the expiration?
3 months is a long time and is a potential security risk if the
access_token
gets intercepted. We're instead going with a much lower 24 hours and relying on apps to automatically use therefresh_token
more often to obtain a new access_token.Do I need to update my app?
Probably not, since you should already be handling expired an
access_token
and refreshing it automatically. If you're hard coding a refresh interval, we suggest making that check dynamic and based on theexpires_in
value instead. If you aren't doing this, check out the Trakt API docs.What about existing access tokens?
They should continue to work up until their expiration date. At that time, your app needs to refresh it and get a new access_token, then use the
expires_in
value so your app can dynamically handle when to refresh.Please let us know your feedback on this change and if your app will be impacted. It's possible there are use cases we haven't considered, but in general any OAuth library should be able to auto refresh tokens no matter the expiration set on them.
Beta Was this translation helpful? Give feedback.
All reactions