• Home
  • Categories
  • Recent
  • Popular
  • Pricing
  • Contact us
  • Docs
  • Login
FusionAuth
  • Home
  • Categories
  • Recent
  • Popular
  • Pricing
  • Contact us
  • Docs
  • Login

JWT Validate returns incorrect exp/iat time

Scheduled Pinned Locked Moved Unsolved
Q&A
2
2
742
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • N
    ndiarmand
    last edited by 19 Apr 2023, 16:54

    Re: .NET Core Client JWT Validate returns incorrect exp/iat time

    Hi, i am having exactly the same issue with the java client library. Using the java library the expiration date is "1681923", but when calling the rest endpoint directly (or using jwt.io) the expiration date is "1681923383".

    Any idea why this happens?

    1 Reply Last reply Reply Quote 0
    • C
      croverw.norene8
      last edited by 22 May 2023, 10:12

      Hello, Time unit difference: The timestamps may be stored or represented in different units. For example, one library might use seconds while the other uses milliseconds. This can result in significantly different values for the expiration date.

      Timezone handling: The libraries may handle timezones differently, which can affect the calculated expiration date. Make sure that the libraries are using the same timezone or that any necessary conversions are being applied consistently.

      Timestamp format: The libraries might use different formats to store or interpret timestamps. Check if the libraries expect timestamps in a specific format and ensure that they are being provided correctly when generating or validating the JWT.

      To resolve the issue, you can try the following steps:

      Review library documentation: Check the documentation of both the .NET Core and Java client libraries for any specific information regarding timestamp handling, timezone considerations, or timestamp formats.

      Verify input values: Ensure that the input values provided to both libraries are consistent and correctly represent the expiration timestamp. Double-check any conversion or formatting steps involved.

      Test with sample data: Create a test case with sample data and compare the outputs of both libraries to identify any discrepancies or patterns.

      Consult library support or community: If the issue persists, consider reaching out to the library maintainers or their respective communities for further assistance. They may be able to provide insights or suggest specific solutions for your scenario.

      1 Reply Last reply Reply Quote 0
      • First post
        Last post