News for hackers. Stuff that matters.
Re:I accidentally became PureGym's unofficial Apple Wallet d... by wrs on Friday August 15, 2025 @06:47PM (#44918156)
Did I interpret correctly that this sends a push notification every minute telling your phone to download a new code? If so, that seems like a battery problem…
Re:I accidentally became PureGym's unofficial Apple Wallet d... by withzombies on Friday August 15, 2025 @08:10PM (#44918694)
You can send background push notifications which are delivered when the phone is ready for them. They don't deliver when the phone is low battery or in low battery mode. It's specifically made to reduce battery consumption.

Higher priority push notifications require a user visible UI element and ca be delivered regardless of certain low power situations.

Re:I accidentally became PureGym's unofficial Apple Wallet d... by wrs on Friday August 15, 2025 @08:32PM (#44918840)
It sounds like this only helps power consumption after you've already run low on power. Seems like processing frequent notifications would accelerate your progress toward that low power state.
Re:I accidentally became PureGym's unofficial Apple Wallet d... by kccqzy on Saturday August 16, 2025 @07:42AM (#44922373)
Yeah but many people turn on Low Power Mode manually every time they unplug or via automation at a high threshold.
Re:I accidentally became PureGym's unofficial Apple Wallet d... by refulgentis on Friday August 15, 2025 @09:48PM (#44919354)
> Higher priority push notifications require a user visible UI element

The QR code for a pass sure sounds like a priority user visible UI element.

Re:I accidentally became PureGym's unofficial Apple Wallet d... by jon-wood on Saturday August 16, 2025 @04:49AM (#44921507)
Only if it’s visible, from the sound of it these are background notifications so that the QR code can be ready if you open the pass.
Re:I accidentally became PureGym's unofficial Apple Wallet d... by dom96 on Friday August 15, 2025 @06:54PM (#44918213)
The article mentions they need to be refreshed every week, so I'd guess at most once a week.
Re:I accidentally became PureGym's unofficial Apple Wallet d... by wrs on Friday August 15, 2025 @08:30PM (#44918821)
The RefreshAt is a week, but if the code is actually valid for a week, it's not clear why a simple screenshot of the code didn't work.
Re:I accidentally became PureGym's unofficial Apple Wallet d... by MBCook on Saturday August 16, 2025 @12:06AM (#44920054)
Because you’d have to waste the time to take a new screenshot every week, of course.
Re:I accidentally became PureGym's unofficial Apple Wallet d... by bpicolo on Friday August 15, 2025 @09:21PM (#44919175)
It seems like it did work and they didn't want to deal with manually updating it weekly
Re:I accidentally became PureGym's unofficial Apple Wallet d... by xeromal on Friday August 15, 2025 @08:57PM (#44918990)
I don't know security that well but if the puregym app refreshes the token then the old tokens would expire immediately right?
Re:I accidentally became PureGym's unofficial Apple Wallet d... by shermantanktop on Friday August 15, 2025 @10:01PM (#44919443)
Nope. As I read it, any token less than a week old would work. So for any user, they have 7 * 24 * 60 tokens live at any time.
Re:I accidentally became PureGym's unofficial Apple Wallet d... by dwedge on Saturday August 16, 2025 @02:32AM (#44920769)
He said the code from Monday didn't work on Tuesday
Re:I accidentally became PureGym's unofficial Apple Wallet d... by valzevul on Saturday August 16, 2025 @02:44AM (#44920846)
Yeah, screenshot on Monday, messed with the app that evening, tried using it Tuesday morning -- dead.

I've seen people on PureGym's Twitter successfully refreshing screenshots weekly though, and the API response suggests the same.

That being said, I couldn't find a validation endpoint to check if mine got invalidated by something specific (maybe signing out?) or if there's some other magic happening.

Re:I accidentally became PureGym's unofficial Apple Wallet d... by dwedge on Saturday August 16, 2025 @03:47AM (#44921188)
I wonder if opening the app invalidated it, and those people who had it working just screenshot once.

My gym has a similar system but I realised it's time based and the app functions without Internet. I installed the app onto an old android with no sim, logged in at home over WiFi and it successfully regenerated QRs without data

Re:I accidentally became PureGym's unofficial Apple Wallet d... by wahnfrieden on Friday August 15, 2025 @10:11PM (#44919517)
no
Re:I accidentally became PureGym's unofficial Apple Wallet d... by aembleton on Saturday August 16, 2025 @07:39AM (#44922356)
Probably invalidates old tokens when a new one is generated.
Re:I accidentally became PureGym's unofficial Apple Wallet d... by ItsHarper on Saturday August 16, 2025 @11:39AM (#44924392)
I think ideally you'd do it maybe every day or so, so that if the user goes offline for a while, or the server you're running goes down or something, the pass will continue to work for at least 6 days. It buys you a lot of time to fix things.