How To Get Expiration Date of Azure Mobile Services Auth Token
This is another post about Custom Authentication in Azure Mobile Services.
Recently I also wrote about how the get the user logged in (owner of the auth token) and all the code is available in my "Bootstrap Azure Mobile Services" repo on Github called ZuMo.API.
The thing about these auth tokens you get in exchange for user credentials is, that they expire. In the code the expiration date is set to 30 days, but it might not always be handy that the consuming app should keep tap on the expiry all the time - without having a chance to "catch up".
So I added a
/accounts/token endpoint to the mobile service that you can call with your auth token included as usual.
And in return it will give you expiration date and seconds remaining until expiry.
Now we just need a way to renew it without having to login - stay tuned for that!