Perpetual Auth token expiry issue

Hi,

As a health locker, we will be storing the user’s auth token that is obtained when user approves an authorization request. In the approve auth payload, we are sending the "generatePerpetualToken": true

{
  "generatePerpetualToken": true
}

Upon this, we are receiving the payload of /v0.5/users/auth/notify callback which has the token to be used for linking and approving consents on user’s behalf.

But when checked the details of the token on jwt.io , we are seeing that the token is having validity of only 24h whereas it should have been of 1 year as per the payload -> "expiry": "2023-05-24T13:08:51.923599",

Payload

{
  "requestId": "42e77c05-4be5-4b7f-b66d-2dc59972825d",
  "timestamp": "2022-05-24T13:08:51.923686",
  "auth": {
    "transactionId": "ee248e6a-3395-4d57-96b1-160bcf3f099e",
    "status": "GRANTED",
    "accessToken": "eyJhbGciOiJSUzUxMiJ9.eyJzdWIiOiJib2J0aGVidWlsZGVyQHNieCIsInJlcXVlc3RlclR5cGUiOiJISVAiLCJyZXF1ZXN0ZXJJZCI6IkVLQV9ISVAiLCJwYXRpZW50SWQiOiJib2J0aGVidWlsZGVyQHNieCIsInNlc3Npb25JZCI6ImUxZDRiZmFkLWM4ZjYtNGE5MC1hZTMxLWYyYWU4OTZkODZhMiIsImV4cCI6MTY1MzQ4NDEzMSwiaWF0IjoxNjUzMzk3NzMxfQ.iHIfo0r7H_bv3LNpLfwg28YSoh3O8a5WI4RGNxxmF0xKXe5AEedsMEvd41pWS142KRDR0Mir1NMbTTjXypmgoSaQD1wXE9BeRRJLklb-spoEjtjTB-FyBtM8PUiNBG8ar4M1E427jS4PNgTaw0XogXFDdK50H2xTLG6fqSxPr1XdVmB8xcJLKaTof42n1V1G7Bex2WJlaHe1CbiDrLhc5EbhIGrEwyV9bqJdaY3suJkRSN_xDnQvfAxtR6z3oGK9YxBtU9-B7k8t58iB2i29ktazuS8-uBXSJ_glbc6m_GOwPCXsraECuHuoq_4N3yJ6CcQSz_s5Ok6ldxKxoHgNVQ",
    "validity": {
      "purpose": "KYC_AND_LINK",
      "requester": {
        "type": "HIP",
        "id": "EKA_HIP",
        "name": null
      },
      "expiry": "2023-05-24T13:08:51.923599",
      "limit": 1
    },
    "patient": {
      "id": "bobthebuilder@sbx",
      "name": "Ayush Kumar",
      "gender": "M",
      "yearOfBirth": 199X,
      "address": {
        "line": null,
        "district": "XXXX",
        "state": "XXXX",
        "pincode": null
      },
      "healthIdNumber": null,
      "identifiers": [
        {
          "type": "MOBILE",
          "value": "+91-99705XXXXX"
        }
      ]
    }
  }
}

Decoded token

{
  "sub": "bobthebuilder@sbx",
  "requesterType": "HIP",
  "requesterId": "EKA_HIP",
  "patientId": "bobthebuilder@sbx",
  "sessionId": "e1d4bfad-c8f6-4a90-ae31-f2ae896d86a2",
  "exp": 1653484131,   //  May 25, 2022 
  "iat": 1653397731     // May 24, 2022
}

@Govind_Deshmukh kindly look.

@Govind_Deshmukh Could you please check this and let us know.

@Govind_Deshmukh - Please confirm on the same

Hey @Govind_Deshmukh, any update on this?

Hi @ayush,

Sorry for delaying response but as per our understand please check accessToken and expiry date should be same.

Thanks,
Govind D.

Hi @ayush,
May i know the issue is resolved or not? if yes please confirm once we can close this ticket.

Thanks,
Govind D.

Hi @Govind_Deshmukh ,

No, we are still seeing the same issue. This one on sandbox I did last night and saved the responses.

Here also, the token is said to expire in 1 day as per decoded data on jwt.io whereas the metadata in the payload here says otherwise.

Auth Notify callback

{
    "requestId": "34a117ce-0547-4b9d-9b0f-1194458a3539",
    "timestamp": "2022-07-20T15:03:57.736455",
    "auth": {
        "transactionId": "85e8fbec-1222-4427-ae0c-282a0d790d09",
        "status": "GRANTED",
        "accessToken": "eyJhbGciOiJSUzUxMiJ9.eyJzdWIiOiJib2J0aGVidWlsZGVyQHNieCIsInJlcXVlc3RlclR5cGUiOiJISVAiLCJyZXF1ZXN0ZXJJZCI6IkVLQV9ISVAiLCJwYXRpZW50SWQiOiJib2J0aGVidWlsZGVyQHNieCIsInNlc3Npb25JZCI6IjU5ODljZWQwLWQ2NGYtNDdmZi1iN2JlLTM3ZDQyYjNkY2U5NiIsImV4cCI6MTY1ODQxNTgzNywiaWF0IjoxNjU4MzI5NDM3fQ.G1tJcmywDA6uRL0Rj5nizEUJMe4ODyQRJTtrQD5-LSTCLu7ErGhaR5TZlB5Jczp1PqCGMHAdM0ArCb0zc31KNd8adJ_nO3tEzPfx5TLyMSzdGa_UeQsLR9_a5he9ZITXRLtxYIgK2PseQ5VA7XGqI_xgQxDG5XgAvyGAa0bxcXvGL2fXOZpYYDs9IgV8VJq1jiLv9M8hD1Nv7fnPJfVmIVp7lPF18BKXaHb-75jxZF3URSccXkLhrlPLXcY_66OWCirpeCAaUS8ThomC_C2KYEhV08MKkh6yBpzBL0_uOTX8P_PAxn5DH_rBb24gWn3VXIZL7Y3J7JPzBZzP_2Whkg",
        "validity": {
            "purpose": "KYC_AND_LINK",
            "requester": {
                "type": "HIP",
                "id": "EKA_HIP",
                "name": null
            },
            "expiry": "2023-07-20T15:03:57.736344",
            "limit": 1
        },
        "patient": {
            "id": "bobthebuilder@sbx",
            "name": "Ayush Kumar",
            "gender": "M",
            "yearOfBirth": XXXX,
            "address": {
                "line": null,
                "district": "XXXX",
                "state": "XXXX",
                "pincode": null
            },
            "healthIdNumber": "",
            "identifiers": [
                {
                    "type": "MOBILE",
                    "value": "+91-XXXXXXXXXX"
                }
            ]
        }
    }
}

Decoded data

{
  "sub": "bobthebuilder@sbx",
  "requesterType": "HIP",
  "requesterId": "EKA_HIP",
  "patientId": "bobthebuilder@sbx",
  "sessionId": "5989ced0-d64f-47ff-b7be-37d42b3dce96",
  "exp": 1658415837,
  "iat": 1658329437
}

Thanks,
Ayush

Hi @ayush,

Could you please provide your details we need to set call and resolve this issue.

Thanks,
Govind D.

Hey @IntegrationSupport @Govind_Deshmukh @Ramandeep1
I’m now having the same problem with production.
I created a perpetual token yesterday; its expiration time in the callback request is 2024-02-23T10:11:21.544261, which is a year, but its expiration time in the decoded token is only a day.


{
“sub”: “mustafiz.1004@abdm”,
“requesterType”: “HIP”,
“requesterId”: “IN2910085947”,
“patientId”: “mustafiz.1004@abdm”,
“sessionId”: “123a5e0f-873b-4c1e-aa3e-c7dcd138ba93”,
“exp”: 1677233481, // Feb 24, 2023, 15:41:21
“iat”: 1677147081. // Feb 23, 2023. 15:41:21
}

Can you please check this and help me to resolve this?

@ayush
Hi ayush
this is bhaskar
i am not generating the PerpetualToken can u please help me