# Esignet on Local deployment - Relying party UI (Health Portal)

**URL:** <https://community.mosip.io/t/esignet-on-local-deployment-relying-party-ui-health-portal/1133>\
**Category:** General\
**Created:** [March 11, 2024, 6:06am UTC](https://community.mosip.io/t/esignet-on-local-deployment-relying-party-ui-health-portal/1133 "2024-03-11T06:06:38Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Manoj](https://avatars.discourse-cdn.com/v4/letter/m/d9b06d/32.png) [@Manoj](https://community.mosip.io/u/Manoj)\
**Post date:** [March 11, 2024, 6:06am UTC](https://community.mosip.io/t/esignet-on-local-deployment-relying-party-ui-health-portal/1133/1 "2024-03-11T06:06:38Z")

</div>

Dear Mosip Community,

We are trying to configure the esignet service, OIDC UI and Relying party UI in our local system environment. We are getting below issue when we are authenticating using OTP. not able to get the token successfully and getting message "session expired " when it is redirecting to the the relying party portal after clicking on verify. Please refer the screen shot attached.

{  
“message”: “Request failed with status code 400”,  
“name”: “AxiosError”,  
“stack”: “AxiosError: Request failed with status code 400\n at settle (/home/ubuntu/manojFILES/esignet/partyService/node\_modules/axios/dist/node/axios.cjs:1967:12)\n at IncomingMessage.handleStreamEnd (/home/ubuntu/manojFILES/esignet/partyService/node\_modules/axios/dist/node/axios.cjs:3066:11)\n at IncomingMessage.emit (node:events:525:35)\n at endReadableNT (node:internal/streams/readable:1358:12)\n at processTicksAndRejections (node:internal/process/task\_queues:83:21)\n at Axios.request (/home/ubuntu/manojFILES/esignet/partyService/node\_modules/axios/dist/node/axios.cjs:3877:41)\n at processTicksAndRejections (node:internal/process/task\_queues:96:5)\n at async post\_GetToken (/home/ubuntu/manojFILES/esignet/partyService/esignetService.js:38:20)\n at async /home/ubuntu/manojFILES/esignet/partyService/app.js:14:27”,  
“config”: {  
“transitional”: {  
“silentJSONParsing”: true,  
“forcedJSONParsing”: true,  
“clarifyTimeoutError”: false  
},  
“adapter”: [  
“xhr”,  
“http”  
],  
“transformRequest”: [  
null  
],  
“transformResponse”: [  
null  
],  
“timeout”: 0,  
“xsrfCookieName”: “XSRF-TOKEN”,  
“xsrfHeaderName”: “X-XSRF-TOKEN”,  
“maxContentLength”: -1,  
“maxBodyLength”: -1,  
“env”: {  
“Blob”: null  
},  
“headers”: {  
“Accept”: “application/json, text/plain, _/_”,  
“Content-Type”: “application/x-www-form-urlencoded”,  
“User-Agent”: “axios/1.6.7”,  
“Content-Length”: “835”,  
“Accept-Encoding”: “gzip, compress, deflate, br”  
},  
“method”: “post”,  
“url”: “[http://152.67.8.144:8088/v1/esignet/oauth/v2/token](http://152.67.8.144:8088/v1/esignet/oauth/v2/token)”,  
“data”: “code=\_3pt\_so8tNa9M8k2ip322d\_vVmk-elmNKbbeh9j57uM&client\_id=healthservices&redirect\_uri=http%3A%2F%2F152.67.8.144%3A5000%2Fuserprofile&grant\_type=authorization\_code&client\_assertion\_type=urn%3Aietf%3Aparams%3Aoauth%3Aclient-assertion-type%3Ajwt-bearer&client\_assertion=eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJoZWFsdGhzZXJ2aWNlcyIsInN1YiI6ImhlYWx0aHNlcnZpY2VzIiwiYXVkIjoiaHR0cDovLzE1Mi42Ny44LjE0NDo4MDg4L3YxL2VzaWduZXQvb2F1dGgvdjIvdG9rZW4iLCJpYXQiOjE3MTAxMzM4MzAsImV4cCI6MTcxMDEzNzQzMH0.IE9mdhKln7gYJ5b35ACyXFO5LfERREB00f53xpqVUhljl-B0w1Fueh76Sh358A8A7JzKTMCy3hnCvmJcOa9jJDvFRu6kMdoZpxXaKByhq4RZpFS23rajztVujyEQglghNJ8B0zGn0-foRJNbE6iU\_d3MfvnOhpwiMBvqwKhFC90sFUK-gAThklKPLWj502h3FPjuCBQkxhEOrLNNnzGLSzlMkiIlES7u6yJkUegB5NU\_kHmDEdmYPXhGSXNCx4goN9xWqbURaGGJ-ryOy4rN\_OmSnAPk38cXQo4tpBeIv6emNYsN1HUejEKSQL613LjQZZw0wM5bHErSkYXmeI7UuQ”  
},  
“code”: “ERR\_BAD\_REQUEST”,  
“status”: 400  
}

 ![Esignet_Error](https://europe1.discourse-cdn.com/flex017/uploads/mosip1/original/2X/a/a550a74b2c4c864dd483e4050f8c6e293cac8c09.png)

---

<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:** [March 12, 2024, 10:14am UTC](https://community.mosip.io/t/esignet-on-local-deployment-relying-party-ui-health-portal/1133/2 "2024-03-12T10:14:23Z")

</div>

Hi @Manoj

Thank you for reaching out and providing details about the issue you’re facing with the eSignet service. I understand the importance of resolving this matter promptly.

Based on the error message you shared, it seems that the request is failing with a status code of 400, indicating a bad request. Our team will share a few steps you can take to troubleshoot and potentially resolve this issue. @Anusha_sunkadh Please look into this.

Best Regards,  
Team MOSIP

---

<div class="post-metadata">

**Author:** ![Anusha\_sunkadh](https://dub1.discourse-cdn.com/flex017/user_avatar/community.mosip.io/anusha_sunkadh/32/30_2.png) [@Anusha\_sunkadh](https://community.mosip.io/u/Anusha_sunkadh)\
**Post date:** [April 2, 2024, 7:14am UTC](https://community.mosip.io/t/esignet-on-local-deployment-relying-party-ui-health-portal/1133/3 "2024-04-02T07:14:25Z")

</div>

Hi @Manoj

You could notice this issue if the mock-relying-party-service is configured with wrong oidc private key.

The below env variable should be set with base64 encoded private key(JWK)

- **CLIENT\_PRIVATE\_KEY** : Holds private key for authentication and security.

Example:

> <https://github.com/mosip/esignet-mock-services/blob/master/mock-relying-party-service/config.js#L4>

Another reason could be incorrect audience value in the assertion JWT sent in the token request.  
For more details pease check the esignet-service logs.

thanks & regards

---

<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 23, 2024, 6:20am UTC](https://community.mosip.io/t/esignet-on-local-deployment-relying-party-ui-health-portal/1133/4 "2024-04-23T06:20:18Z")

</div>

Hi @Manoj

Let us know if the above response helps you to solve the issue.

Best Regards,  
Team MOSIP
