# Problem downloading credentials in the inji stack setup

**URL:** <https://community.mosip.io/t/problem-downloading-credentials-in-the-inji-stack-setup/1973>\
**Category:** Developer\
**Tags:** inji\
**Created:** [April 7, 2025, 2:11pm UTC](https://community.mosip.io/t/problem-downloading-credentials-in-the-inji-stack-setup/1973 "2025-04-07T14:11:36Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![TomasOGTIC](https://avatars.discourse-cdn.com/v4/letter/t/c4cdca/32.png) [@TomasOGTIC](https://community.mosip.io/u/TomasOGTIC)\
**Post date:** [April 7, 2025, 2:11pm UTC](https://community.mosip.io/t/problem-downloading-credentials-in-the-inji-stack-setup/1973/1 "2025-04-07T14:11:36Z")

</div>

I am running the inji stack setup that can be found in the inji-certify repository here: [inji-certify/docker-compose/docker-compose-injistack at master · mosip/inji-certify](https://github.com/mosip/inji-certify/tree/master/docker-compose/docker-compose-injistack).

After following all the steps, everything seems to be running normally, but every time I try to download a credential, I get this error after signing in with esignet:

 ![image](https://europe1.discourse-cdn.com/flex017/uploads/mosip1/original/2X/6/63bc64adabaf9b0c0e000ed75cab76f368658bf8.png)

This is the part where I am stuck.

The logs in inji certify says:

```auto
org.springframework.security.oauth2.jwt.JwtValidationException: An error occurred while attempting to decode the Jwt: The iat claim is not valid

```

```auto
No Bearer / Opaque token provided, continue with the request chain

```

```auto
io.mosip.certify.core.exception.NotAuthenticatedException: invalid_token

```

My did is hosted in [tomas-alexander.github.io/credenciales/farmer/did.json](https://tomas-alexander.github.io/credenciales/farmer/did.json). Here it is:

```auto
{
  "assertionMethod": [
    "did:web:tomas-alexander.github.io:credenciales:farmer#key-0"
  ],
  "service": [],
  "id": "did:web:tomas-alexander.github.io:credenciales:farmer",
  "verificationMethod": [
    {
      "publicKeyMultibase": "z6MkvHNVc7iCqZwJkbzTZEBVSPeUyWNAk4RBjEamDo9CBsYd",
      "controller": "did:web:tomas-alexander.github.io:credenciales:farmer",
      "id": "did:web:tomas-alexander.github.io:credenciales:farmer#key-0",
      "type": "Ed25519VerificationKey2020",
      "@context": "https://w3id.org/security/suites/ed25519-2020/v1"
    }
  ],
  "@context": [
    "https://www.w3.org/ns/did/v1"
  ],
  "alsoKnownAs": [],
  "authentication": [
    "did:web:tomas-alexander.github.io:credenciales:farmer#key-0"
  ]
}

```

These are the URI I use in certify-csvdp-farmer.properties:

```auto
mosip.certify.data-provider-plugin.issuer-uri=did:web:tomas-alexander.github.io:credenciales:farmer
mosip.certify.data-provider-plugin.issuer-public-key-uri=did:web:tomas-alexander.github.io:credenciales:farmer#key-0

```

Mimoto error log:

```auto
org.springframework.web.client.HttpClientErrorException$Unauthorized: 401 : "{"error":"invalid_token","error_description":"invalid_token"}"

```

Inji-web error log:

```auto
"POST /v1/mimoto/credentials/download HTTP/1.1" 500 128 "http://localhost:3001/redirect?state=jz92iPDFsDiJ_nC8-HMq3H8xQOl6nAQFv5Hzxg8.ECu&code=5vBHJecXvPDv-9ijSB6MAC3_hB1k-0i24nSbeEg-pg8" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/135.0.0.0 Safari/537.36 Edg/135.0.0.0" "-"

```

How can I solve this invalid token error?

---

<div class="post-metadata">

**Author:** ![TomasOGTIC](https://avatars.discourse-cdn.com/v4/letter/t/c4cdca/32.png) [@TomasOGTIC](https://community.mosip.io/u/TomasOGTIC)\
**Post date:** [April 7, 2025, 3:16pm UTC](https://community.mosip.io/t/problem-downloading-credentials-in-the-inji-stack-setup/1973/2 "2025-04-07T15:16:25Z")

</div>

I also confirmed that the did is the same as the one in [localhost:8090/v1/certify/issuance/.well-known/did.json](http://localhost:8090/v1/certify/issuance/.well-known/did.json)

---

<div class="post-metadata">

**Author:** ![svahsek](https://dub1.discourse-cdn.com/flex017/user_avatar/community.mosip.io/svahsek/32/1098_2.png) [@svahsek](https://community.mosip.io/u/svahsek)\
**Post date:** [April 8, 2025, 5:00am UTC](https://community.mosip.io/t/problem-downloading-credentials-in-the-inji-stack-setup/1973/3 "2025-04-08T05:00:03Z")

</div>

Dear @TomasOGTIC ,

Thank you for reaching out, One of our expert colleagues will respond to your query here.

Best Regards  
Team MOSIP

---

<div class="post-metadata">

**Author:** ![Harsh\_Vardhan](https://dub1.discourse-cdn.com/flex017/user_avatar/community.mosip.io/harsh_vardhan/32/1361_2.png) [@Harsh\_Vardhan](https://community.mosip.io/u/Harsh_Vardhan)\
**Post date:** [April 8, 2025, 5:10am UTC](https://community.mosip.io/t/problem-downloading-credentials-in-the-inji-stack-setup/1973/4 "2025-04-08T05:10:37Z")

</div>

Hi @TomasOGTIC,

Thanks for trying out Inji Stack.

Can you check if your machine’s time is correctly synced with the time servers? A good way to do this is to open [https://time.is/](https://time.is/) on your browser. If you get " Your time is exact!" on the above page, it may be due to another issue, if it does not you’d have to sync your machines’ time with an NTP server.

---

<div class="post-metadata">

**Author:** ![TomasOGTIC](https://avatars.discourse-cdn.com/v4/letter/t/c4cdca/32.png) [@TomasOGTIC](https://community.mosip.io/u/TomasOGTIC)\
**Post date:** [April 8, 2025, 5:29pm UTC](https://community.mosip.io/t/problem-downloading-credentials-in-the-inji-stack-setup/1973/5 "2025-04-08T17:29:59Z")

</div>

Thank you! It was actually that. I was ahead by 23 seconds 🥲

---

<div class="post-metadata">

**Author:** ![sanchi-singh24](https://dub1.discourse-cdn.com/flex017/user_avatar/community.mosip.io/sanchi-singh24/32/538_2.png) [@sanchi-singh24](https://community.mosip.io/u/sanchi-singh24)\
**Post date:** [April 28, 2025, 4:57am UTC](https://community.mosip.io/t/problem-downloading-credentials-in-the-inji-stack-setup/1973/6 "2025-04-28T04:57:27Z")

</div>

Hi @TomasOGTIC,

Just checking in — is everything working fine now?  
If you’re still facing any issues, please let us know. We’d be happy to assist!

Best regards,  
Team MOSIP

---

<div class="post-metadata">

**Author:** ![TomasOGTIC](https://avatars.discourse-cdn.com/v4/letter/t/c4cdca/32.png) [@TomasOGTIC](https://community.mosip.io/u/TomasOGTIC)\
**Post date:** [April 29, 2025, 3:24pm UTC](https://community.mosip.io/t/problem-downloading-credentials-in-the-inji-stack-setup/1973/7 "2025-04-29T15:24:15Z")

</div>

Hi @sanchi-singh24 ,

I was able to download credentials from the .csv file succesfully. Thank you for the support.

Right now I am trying to use the PostgreSQL plugin but I am a little lost in how I should implement it. But that’s probably for another question and another thread.

That being said, is it possible to use the PostgreSQL plugin that can be found in [mosip/inji-certify: Repository hosts the source code, documentation, and other related files for the Inji Certify project](https://github.com/mosip/inji-certify/tree/master?tab=readme-ov-file) in the inji stack setup that can be found in [inji-certify/docker-compose/docker-compose-injistack/README.md at master · mosip/inji-certify](https://github.com/mosip/inji-certify/blob/master/docker-compose/docker-compose-injistack/README.md)?

If it’s possible I can open another question to express my doubts

---

<div class="post-metadata">

**Author:** ![Varaniya1](https://dub1.discourse-cdn.com/flex017/user_avatar/community.mosip.io/varaniya1/32/1322_2.png) [@Varaniya1](https://community.mosip.io/u/Varaniya1)\
**Post date:** [April 30, 2025, 6:00pm UTC](https://community.mosip.io/t/problem-downloading-credentials-in-the-inji-stack-setup/1973/8 "2025-04-30T18:00:20Z")

</div>

Hi @TomasOGTIC

yes you can follow the steps mentioned in the link you shared to setup certify with postgres SQL. it is supported.

Regards,  
Varaniya S  
On behalf of MOSIP

---

<div class="post-metadata">

**Author:** ![Harsh\_Vardhan](https://dub1.discourse-cdn.com/flex017/user_avatar/community.mosip.io/harsh_vardhan/32/1361_2.png) [@Harsh\_Vardhan](https://community.mosip.io/u/Harsh_Vardhan)\
**Post date:** [May 15, 2025, 4:51am UTC](https://community.mosip.io/t/problem-downloading-credentials-in-the-inji-stack-setup/1973/9 "2025-05-15T04:51:52Z")

</div>

Hi @TomasOGTIC ,

You can use PostgresSQL plugin in the docker compose example, you’d have to create relevant entries in the Postgres pod and configure it accordingly.

However, I’d like to know if there’s any reason or preference for wanting to try out the same? We made `docker compose injistack` as a 10minute setup for demo(s) and a single node testing/VC design-generation-download-verification journey and purposefully kept the README minimal.

[Here’s the README for configuring the Postgres dataprovider plugin.](https://github.com/mosip/digital-credential-plugins/tree/develop/postgres-dataprovider-plugin), if you have a specific usecase, do use it and share feedback.

---

<div class="post-metadata">

**Author:** ![lyson\_kaunda1](https://dub1.discourse-cdn.com/flex017/user_avatar/community.mosip.io/lyson_kaunda1/32/1496_2.png) [@lyson\_kaunda1](https://community.mosip.io/u/lyson_kaunda1)\
**Post date:** [May 16, 2025, 2:29pm UTC](https://community.mosip.io/t/problem-downloading-credentials-in-the-inji-stack-setup/1973/10 "2025-05-16T14:29:45Z")

</div>

How do u manage to do this? Mine is behind with 0.06 seconds!!

---

<div class="post-metadata">

**Author:** ![Harsh\_Vardhan](https://dub1.discourse-cdn.com/flex017/user_avatar/community.mosip.io/harsh_vardhan/32/1361_2.png) [@Harsh\_Vardhan](https://community.mosip.io/u/Harsh_Vardhan)\
**Post date:** [May 22, 2025, 6:44am UTC](https://community.mosip.io/t/problem-downloading-credentials-in-the-inji-stack-setup/1973/11 "2025-05-22T06:44:04Z")

</div>

> How do u manage to do this? Mine is behind with 0.06 seconds!!

For now, you’d have to sync your machine time with an NTP server, but worry not, a 0.06 second delay shouldn’t be causing a VC download failure IMO.

Your Operating system might be scheduled to do this on a more frequent basis, but you can also trigger it by yourself.
