question

Paul Pacheco avatar image
Paul Pacheco asked

Getting EntityTokenExpired

Sometimes after a few days or so, my servers start getting EntityTokenExpired when users try to authenticate and I have to restart my servers.

Why am I getting this? how to get around it?

10 |1200

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

1 Answer

·
Hernando avatar image
Hernando answered

For security, the EntityToken will expire after a certain period. The time the token will expire will be returned as a property(TokenExpiration) in GetEntityTokenResponse when you call GetEntityToken.

Based on your description, I guess your server will automatically call GetEntityToken when it restarts. This will cause the EntityTokenExpired Error to be fixed.

So, you can write a scheduled task in your server to call the GetEntityToken periodically before the token expires to avoid this Error.

1 comment
10 |1200

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

Paul Pacheco avatar image Paul Pacheco commented ·

Ok, thanks, I made it so that my server will call GetEntityToken 1 hour before expiration.

0 Likes 0 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

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