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

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”,
“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
}

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

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:

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

1 Like

Hi @Manoj

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

Best Regards,
Team MOSIP