Closed dreadnautxbuddha closed 5 years ago
Hey there!
The portal session ID can only be used once. The duration of 1 hour means that you should use the portal session within 1 hour of generating it, after which it will expire.
You should not be reusing portal session object, instead you can create a new session every time when you need to open Portal.
Cheers!
Ohh, ok. Thanks for this @cb-dinesh.
So I made a PHP API that returns a portal session object which then stores the API id in the database. After this, the portal pops up, bla bla bla then I close it. Around 5 seconds later, I open the popup again, which calls the portal session API which then fetches the portal session object by id (which I stored in the database earlier). This is where I then get the 401 error saying that the token has expired. But as I've seen from the docs, should last about an hour before expiring.
What am I doing wrong? I checked out your Laravel test server and it keeps on creating a new portal session. Should I stop reusing portal session objects?
main.component.ts
chargebee.service.ts
Lumen API:
Some model