JavaScript is required to use Bungie.net

Group Avatar

BungieNetPlatform

"Updates, discussions, and documentation of the BungieNetPlatform API."

Request Join
originally posted in:BungieNetPlatform
4/3/2016 3:53:38 PM
2

How to handle token expiration?

Hi, i'm wondering how other people is handling token expiration on their apps. I used to base mine on when you get the Need Sign In error back in the call, but, all the PUBLIC end points don't behave like that, if you are logged in they return more info than when you are not logged in, but no error is present. I talked with VThron a few months back and he said that if you check the cookies on the response and the bungle token is not set as a cookie then you need to log in, but, i see that some end points like "User/GetBungieNetUser/" and "User/GetMembershipIds" don't have the cookies set on the response, so, after i log in it tells me i need to log in again, because no cookie is set. Are you guys hardcoding that only checks for other end points or is there a better way of doing this.

Posting in language:

 

Play nice. Take a minute to review our Code of Conduct before submitting your post. Cancel Edit Create Fireteam Post

View Entire Topic
  • Still on my todo list, but I'd get the expiration date of said cookie and keep it somewhere you can access later and either check it before you make any authenticated requests, or as part of your app start up.

    Posting in language:

     

    Play nice. Take a minute to review our Code of Conduct before submitting your post. Cancel Edit Create Fireteam Post

    3 Replies
    You are not allowed to view this content.
    ;
    preload icon
    preload icon
    preload icon