Idea

[not provided] avatar image
[not provided] suggested

Session ticket expiry Timestamp

If we could know when the session ticket would expire, it will help developers in lot of areas. Least we want is a duration after which a session ticket would expire. Alternatively a UTC time stamp in seconds would work well.

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

4 Comments

·
Hamza Lazaar avatar image
Hamza Lazaar commented

all PlayFab issued tokens (session tickets, secrets) have a 24-hours lifetime.
I'm sure Brendan will intervene to confirm or rectify this information.

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

brendan avatar image
brendan commented

Hamza is correct - all tickets currently have a 24 hour lifetime. The normal logic is to always check the response from a call to the service, so that if the ticket should be expired, you can sign the player back in, or otherwise notify the player as needed.

My question would be this: Can you describe the usage case for knowing the remaining time on the ticket? What specifically would this enable?

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

[not provided] avatar image
[not provided] commented

Our idea was to avoid repetitive logins calls by reusing the session ticket, and internally seamlessly relogin if we know that session is about to expire.
But that would require storing the session ticket at our end, which we thought would not be a good idea.
Another remote case is, whenever player joins the game server, performs IAP or any task which involves session ticket validation, we can make sure the session is going to last long enough to complete the task, if not, we implicitly log the player again to renew the session ticket

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

brendan avatar image
brendan commented

The problem then would be that your code would be making an assumption about the ticket being valid for the period stated when you get it. That may not always be the case - in a live service, it's always possible that a condition could occur requiring that we invalidate active sessions out of band to the expiration time on the ticket. Since you would need to handle the case of an expired ticket regardless, a pre-emptive sign in adds unnecessary complexity.

For the purchase case, that's a fairly extreme edge case which we don't expect to occur more than rarely, as it's not influenced by any scaling factors. Also, it's worth noting that for either receipt validation or the three-step purchase flow (beginning with StartPurchase), the flow isn't interrupted by having to sign in again. Once you have a new session ticket, you can pick up from the call that failed with InvalidTicket, regardless of where it is in the purchase flow.

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write a Comment

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Your Opinion Counts

Share your great idea, or help out by voting for other people's ideas.

Related Ideas