Issue with IAPHub inside my Adalo app

I’m running into an issue with IAPHub inside my Adalo app. Here’s the behavior we’re observing:

When a user logs in and opens the app, IAPHub.start() runs successfully and correctly checks the subscription status. Based on this, we show either the paywall or premium content — this works perfectly.

However, after the user logs out and remains in the app as a guest (or in the non-logged-in user interface), if they later click the “Upgrade” button, IAPHub does not seem to re-trigger start() or re-check the subscription status.

As a result, the upgrade flow gets stuck or never progresses — likely because IAPHub is still referencing the previous session or hasn’t reinitialized with a new user ID.

This seems to happen because the IAPHub start() method is only tied to the login flow in Adalo. After logout, there’s no clean way in Adalo to fully reinitialize IAPHub as a new anonymous user (with a fresh userId). So the SDK never performs a fresh subscription check, and all logic based on the subscription state fails.

Does someone have a solution for this issue? Greatly appreciated.

Hi Moris @Mor,

Personally, I don’t think there is any easy solution for this :frowning: .

In my experience, IAPHub is very (a) “tied” to Logged-in User and (b) needs to be started at the very beginning of the app. All my attempts to set it up differently (e.g. store iaphubid in a different collection, or start it later) weren’t successull.

Maybe someone else can advise.

Best,
Victor.

Victor, thank you for you reply.
I contacted IAPhub and as you say, they need to go through logging. I missed that. Changed that flow and got it working. Hope this post helps others. Thanks again

  • Moris
2 Likes