Invalid message(s): * Timestamp (iat) is invalid. Make sure timestamp is in seconds | Community
Skip to main content

Invalid message(s): * Timestamp (iat) is invalid. Make sure timestamp is in seconds

  • October 6, 2021
  • 1 reply
  • 0 views

I try to configure autentication in widget:

 

var payload = new Dictionary<string, object>
{
{ "name", PortalSettings.UserInfo.DisplayName },
{ "email", PortalSettings.UserInfo.Email },
{ "iat", DateTime.Now.ToString("yyyy-MM-dd HH:ss") },
{ "jti", PortalSettings.UserInfo.UserID }

};

1 reply

Eric27
  • October 12, 2021

Hey Ricardo,

The widget is looking for the timestamp to be converted into seconds. Something like the below should work:

DateTime.Now.Subtract(new DateTime(1970, 1, 1))).TotalSeconds;

Hope this helps!

Eric