OIDC UI REDIRECT IN TO Relying party UI (Health Portal) Problem

Dear MOSIP Team,

I have followed all the necessary steps and entered the OTP as required. However, when I clicked the “Consent Verify” button, I did not receive the user information. it shows session expired alert in relying party ui.
Could you please assist me with this issue?





and here is my env-config.js file

module.exports = {
ESIGNET_SERVICE_URL: process.env.ESIGNET_SERVICE_URL ?? “http://localhost:8088/v1/esignet”,
PORT: process.env.PORT ?? 8888,
CLIENT_PRIVATE_KEY: process.env.CLIENT_PRIVATE_KEY ?? ‘ewoJInAiOiAiMC00MElTeFhEbUM4U1ZydWRnMWU3dlFza3lXbG9oYWRtODNSQWtVeUg2UzRoMWFUUHJOd0xWbjlXQU5ueVJUcXVwRDFGcjhtWVo3ZjluWjJNa01qNDVVVjh1aUlqUVpyM2NyTXEwWUdrenRfTHZ3aExkdVdPSl96OV85elpOSGNrWGVpNEc4UVFGSlFZYjNUTmRHc1ZWU3dmZjY4U1NvZW44b3F2a2JrQUpzIiwKCSJrdHkiOiAiUlNBIiwKCSJxIjogIjZhczg4b2RjYlAyTURUOWxrYWhLMno0UUlIMjV6c2FfVWRMZ0F0THdEVnBla1hmSk5PUXZ1cU5ZMUd3M0p3czZ1UERMR2NFSzQyTXllT2RDRnFrbEZUdkRKbEpYTUZ2Z1dybUdiQ1VNdkpMLXJGeU8ta0NUR25GQlg2MG96ZEpiamZCdDNFM1FZeDNHOTA3Wml1dTlvMGF6ZXkxREp0cV96S3dlYXJFLXhUcyIsCgkiZCI6ICJCZ2RlaUNaYnI1cVo0aGFTaGc5dVFpblpSWVBTVVRZY181OFlndlEwV2tQS201ZklOT2dPSlB2aW1kS1lCdDhPdElXYmhvalR5bjBUS3JHUFBBcUZaQ25HWTE2SGtDVU4zMU1ibHVEMnd4WXo2U1BwWjF6c21QOFBiUVVWb3pqRUZlTHBpVE42bnVid19za1NfOUdHcmwxQ1BiMjV3VFBsWnRJM3VRNUlpUExfWUQ1al93NV9KN3RlakFhUmJobEpqNDhaRGE0Q1I4QmthVWkyUWFR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ZjBZb2Ywa3dNZU5jdFhjMXRoUW83MExqZm45ZjRpZ3BSZTdmOHFOc19XNmRMdUxXZW1GaEdKQlFCUTd2dmlja0VDS05KZm9fRXpTRF95eVBDZzdrX0FHYlRXVGt1b09iSHJwaWx3Skd5S1ZTa09JdWpIX0ZxSElWa3drVlhqV2MyNUxzYjhHcTRuQUhOUUVxcWdhWVBMRWk1ZXZDUjZTMEZ6Y1hUUHVSaDl6SC1jTTBPbmp2NG9ycmZZcEVyNjFIY1JwNU1YTDU1Yjd5Qm9JWWxYRDhOZmFsY2dkcld6cDRWWkh2UTh5VDlHNWVhZjI3WFVuNlpCZUJmN1ZuRUxjS0ZUeXcxcEsyd3FvT3hSQmM4WTF3TzZyRXk4UGxDVTZ3RC1tYkl6Y2pHMXdVZm5iZ3ZKT000QTVHNDFxdVEiCn0=’,
ESIGNET_AUD_URL: process.env.ESIGNET_AUD_URL ?? “http://localhost:8088/v1/esignet/oauth/v2/token”,
CLIENT_ASSERTION_TYPE: process.env.CLIENT_ASSERTION_TYPE ?? “urn:ietf:params:oauth:client-assertion-type:jwt-bearer”,
USERINFO_RESPONSE_TYPE: process.env.USERINFO_RESPONSE_TYPE ?? “jwk”,
JWE_USERINFO_PRIVATE_KEY: process.env.JWE_USERINFO_PRIVATE_KEY ?? ‘ewogICJwIjogIjJlWDNaVmxMejR1UFJBTE5uQVI3dl91aGJsOWI3OXNfLWpteFcxaTdiMGZaTV9SZHNWT09yWW9uZ05WQWpuVHFSQm1SRXRndXVHM21LMjZnTDdZMVNpb1hXMF8teWxKRDk2QnlUdDRlTlJoY1pZTXFHZnZkaUEyYTlOQnZqZ1phVkNfWWxFYXFSaVNYaFI1SlJ1emgzX1ViUDFKX3BXaHl4R29fX0txWS1XOCIsCiAgImt0eSI6ICJSU0EiLAogICJxIjogInJwM19GS09rbDdfRzNPeUM1MVBNV2w2eG80SEVwaVdfWDN2X3ZoRWc4X2k4ZFpMMlhlVGdHc1BwZGxNUGJKRU5pN0NyUkFpT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RjRYemJ0b1Y4NEVVS0ZPU3podjVKNG9fYlBKd1p4a2JXNUdEUXhiYVlrLWxfSDhGYk9LVFJTODRGQmw1b0ZjaGItTklrdHJLV1hodVAyNFhkTnYxUDBzN1IxaVNSVVlDeHM1ZHZpY291eVNzIiwKICAiYWxnIjogIlJTQS1PQUVQLTI1NiIsCiAgImRxIjogImRlX3dvUmdGeXhpVVVCTE9Oei01X2ktRy0xQmlhWFdGVkJDRUl2T2V0aW1CNEVkcWJ2QnZES1RWd2oxSFphUnk2YTVoZm9ub2VmRU1wQ1pqV0h3WWZZbFgtNFRXV0hacDhTSExuSkxsem10d3hCZC1kUGY1ZHdnSGRLVHJ5eVBfTVUtYVRkVVBPNldyT1pyd2xFcXdqd2wtR2FyXzFDcWFGOXBDdkxLSk9IRSIsCiAgIm4iOiAibEtESlRUNklGMjZITEEtQi1zSkdnaDl2bl9xVXcxaFR5RTZvUVdNZ19paE0wNVp3bUxQOVBRRWdMaGgwckw4VE1uNDhXN3luVmV0T1BGOUdsb1RiZFVndkZMYlRSejA1dlRhNU41eU9SV0VvTkx0Q0c5SFJwNXRfVXFGZnpRZG1SYkJDV1I5cTJhYWZPVTJRa0tvdXBBdlNGM2tjSHhsNjgzRDVPczA0NW01ZFRMTkFpZlJzbVh4TkptVjNXY244T0tjckdQTHFhTHcxbHJJSG9kNVo5TzFDaXAxalBVcXRwd0VaX3lCVkl2VmpFYWN4T0pWV0JrNUI1T1owOXVILW1EV3pnQXFYNkNmZGU5T0xyYlVIY1hIaUt6VHIwemRGN2g2MTgwU3hWOVdUeFluLUp6RHR5a0lhUklYZ3BsWXQ0cEFqUXZzVlA4d1ZmU2EyekFfSEtRIgp9’
};

Could you please assist me with this issue?

Best regards,
[Michael]

Dear @Michael ,

Thank you for reaching out. Our team is looking into your query and will get back to you shortly.

Best Regards,
MOSIP Team

Dear @Michael ,

Can you please attach the error in the console & network call as well ?

Thank you

@zesu2210 ,

Thank you for your prompt response.





With Regard,

Dear @Michael ,

As i can see in you network logs, fetchUserInfo api is failing thats means may be you are not running mock-relying-party-service. You can found that in esignet-mock-service repo.

Can you please check if it is running or not?

Thanks & Regards

Dear @zesu2210,

mock-relying-party-service . running on port 8888

and package.json. file edited based on readme file

{
“name”: “mock-relying-party-server”,
“version”: “1.0.0”,
“description”: “”,
“main”: “script.js”,
“scripts”: {
“test”: “echo "Error: no test specified" && exit 1”,
“start”: “node app.js”,
“devstart”: “SET PORT=8888 && SET ESIGNET_SERVICE_URL=http://localhost:8088/v1/esignet && node app.js && nodemon .”
},
“author”: “MOSIP”,
“license”: “MIT”,
“dependencies”: {
“axios”: “^1.1.3”,
“express”: “^4.18.2”,
“joi”: “^17.7.0”,
“jose”: “^4.11.1”,
“nodemon”: “^2.0.20”
}
}

With Regards

Dear @zesu2210 @Vibha_Gondkar

>mock-relying-party-server. LOG

C:\Users\MICHAEL\Desktop\new\esignet-mock-services\esignet-mock-services\mock-relying-party-service>npm start

mock-relying-party-server@1.0.0 start
node app.js

Listening on port 8888…
http://localhost:8088/v1/esignet
http://localhost:8088/v1/esignet/oauth/v2/token
http://localhost:8088/v1/esignet
http://localhost:8088/v1/esignet/oauth/v2/token
AxiosError: Request failed with status code 400
at settle (C:\Users\MICHAEL\Desktop\new\esignet-mock-services\esignet-mock-services\mock-relying-party-service\node_modules\axios\dist\node\axios.cjs:1268:12)
at IncomingMessage.handleStreamEnd (C:\Users\MICHAEL\Desktop\new\esignet-mock-services\esignet-mock-services\mock-relying-party-service\node_modules\axios\dist\node\axios.cjs:2446:11)
at IncomingMessage.emit (node:events:531:35)
at endReadableNT (node:internal/streams/readable:1696:12)
at process.processTicksAndRejections (node:internal/process/task_queues:82:21) {
code: ‘ERR_BAD_REQUEST’,
config: {
transitional: {
silentJSONParsing: true,
forcedJSONParsing: true,
clarifyTimeoutError: false
},
adapter: [Function: httpAdapter],
transformRequest: [ [Function: transformRequest] ],
transformResponse: [ [Function: transformResponse] ],
timeout: 0,
xsrfCookieName: ‘XSRF-TOKEN’,
xsrfHeaderName: ‘X-XSRF-TOKEN’,
maxContentLength: -1,
maxBodyLength: -1,
env: { FormData: [Function], Blob: [class Blob] },
validateStatus: [Function: validateStatus],
headers: AxiosHeaders {
‘Content-Type’: ‘application/x-www-form-urlencoded’,
‘User-Agent’: ‘axios/1.1.3’,
‘Content-Length’: ‘828’,
‘Accept-Encoding’: ‘gzip, deflate, br’,
[Symbol(defaults)]: [Object]
},
method: ‘post’,
url: ‘http://localhost:8088/v1/esignet/oauth/v2/token’,
data: ‘code=6mqg3QMoE9QnOyWloRsZf58CuEde2E0RJcPBFnyPuWQ&client_id=healthservices&redirect_uri=http%3A%2F%2Flocalhost%3A5000%2Fuserprofile&grant_type=authorization_code&client_assertion_type=urn%3Aietf%3Aparams%3Aoauth%3Aclient-assertion-type%3Ajwt-bearer&client_assertion=eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJoZWFsdGhzZXJ2aWNlcyIsInN1YiI6ImhlYWx0aHNlcnZpY2VzIiwiYXVkIjoiaHR0cDovL2xvY2FsaG9zdDo4MDg4L3YxL2VzaWduZXQvb2F1dGgvdjIvdG9rZW4iLCJpYXQiOjE3MjIzNDcwMjIsImV4cCI6MTcyMjM1MDYyMn0.GqINoWtSZ-IsbExVJm_ZnovLfMJycSKhr_JXNN6TLvhMPfwhcvGL16cmhp_aYKHoYhrSUBKIS7e9RfaVJfn1JZFxoFHoO67Tcd14nbnLVoMHMX5AF5BHRZf9nJAF9ZexuMjZxeKqejf2Y8RUj56xu3kdtDXDLmqC7vc9zuUgiGamwXPuZa2ZPIQ9UkhS9BbeH7Is08pfLblHyHQpqCkh44YbbzUEngxDustQXWats5PBpMPDVcgMaxBHAicnB1qgPBEZ61zUllZztSoTCdFB2gcMQNVE-xoJxCKnn9AhfPOpZ33CLbZOoYsG2wil6lLDVmmmORMt98rMGVAS0F5z-w’
},
request: <ref *1> ClientRequest {
_events: [Object: null prototype] {
abort: [Function (anonymous)],
aborted: [Function (anonymous)],
connect: [Function (anonymous)],
error: [Function (anonymous)],
socket: [Function (anonymous)],
timeout: [Function (anonymous)],
finish: [Function: requestOnFinish]
},
_eventsCount: 7,
_maxListeners: undefined,
outputData: ,
outputSize: 0,
writable: true,
destroyed: false,
_last: false,
chunkedEncoding: false,
shouldKeepAlive: false,
maxRequestsOnConnectionReached: false,
_defaultKeepAlive: true,
useChunkedEncodingByDefault: true,
sendDate: false,
_removedConnection: false,
_removedContLen: false,
_removedTE: false,
strictContentLength: false,
_contentLength: ‘828’,
_hasBody: true,
_trailer: ‘’,
finished: true,
_headerSent: true,
_closed: false,
socket: Socket {
connecting: false,
_hadError: false,
_parent: null,
_host: ‘localhost’,
_closeAfterHandlingError: false,
_events: [Object],
_readableState: [ReadableState],
_writableState: [WritableState],
allowHalfOpen: false,
_maxListeners: undefined,
_eventsCount: 7,
_sockname: null,
_pendingData: null,
_pendingEncoding: ‘’,
server: null,
_server: null,
timeout: 5000,
parser: null,
_httpMessage: [Circular *1],
autoSelectFamilyAttemptedAddresses: [Array],
[Symbol(async_id_symbol)]: 71,
[Symbol(kHandle)]: [TCP],
[Symbol(lastWriteQueueSize)]: 0,
[Symbol(timeout)]: Timeout {
_idleTimeout: 5000,
_idlePrev: [TimersList],
_idleNext: [Timeout],
_idleStart: 1711305,
_onTimeout: [Function: bound ],
_timerArgs: undefined,
_repeat: null,
_destroyed: false,
[Symbol(refed)]: false,
[Symbol(kHasPrimitive)]: false,
[Symbol(asyncId)]: 70,
[Symbol(triggerId)]: 0
},
[Symbol(kBuffer)]: null,
[Symbol(kBufferCb)]: null,
[Symbol(kBufferGen)]: null,
[Symbol(shapeMode)]: true,
[Symbol(kCapture)]: false,
[Symbol(kSetNoDelay)]: true,
[Symbol(kSetKeepAlive)]: true,
[Symbol(kSetKeepAliveInitialDelay)]: 60,
[Symbol(kBytesRead)]: 0,
[Symbol(kBytesWritten)]: 0
},
_header: ‘POST /v1/esignet/oauth/v2/token HTTP/1.1\r\n’ +
‘Accept: application/json, text/plain, /\r\n’ +
‘Content-Type: application/x-www-form-urlencoded\r\n’ +
‘User-Agent: axios/1.1.3\r\n’ +
‘Content-Length: 828\r\n’ +
‘Accept-Encoding: gzip, deflate, br\r\n’ +
‘Host: localhost:8088\r\n’ +
‘Connection: keep-alive\r\n’ +
‘\r\n’,
_keepAliveTimeout: 0,
_onPendingData: [Function: nop],
agent: Agent {
_events: [Object: null prototype],
_eventsCount: 2,
_maxListeners: undefined,
defaultPort: 80,
protocol: ‘http:’,
options: [Object: null prototype],
requests: [Object: null prototype] {},
sockets: [Object: null prototype],
freeSockets: [Object: null prototype] {},
keepAliveMsecs: 1000,
keepAlive: true,
maxSockets: Infinity,
maxFreeSockets: 256,
scheduling: ‘lifo’,
maxTotalSockets: Infinity,
totalSocketCount: 2,
[Symbol(shapeMode)]: false,
[Symbol(kCapture)]: false
},
socketPath: undefined,
method: ‘POST’,
maxHeaderSize: undefined,
insecureHTTPParser: undefined,
joinDuplicateHeaders: undefined,
path: ‘/v1/esignet/oauth/v2/token’,
_ended: true,
res: IncomingMessage {
_events: [Object],
_readableState: [ReadableState],
_maxListeners: undefined,
socket: [Socket],
httpVersionMajor: 1,
httpVersionMinor: 1,
httpVersion: ‘1.1’,
complete: true,
rawHeaders: [Array],
rawTrailers: ,
joinDuplicateHeaders: undefined,
aborted: false,
upgrade: false,
url: ‘’,
method: null,
statusCode: 400,
statusMessage: ‘’,
client: [Socket],
_consuming: false,
_dumped: false,
req: [Circular *1],
_eventsCount: 4,
responseUrl: ‘http://localhost:8088/v1/esignet/oauth/v2/token’,
redirects: ,
[Symbol(shapeMode)]: true,
[Symbol(kCapture)]: false,
[Symbol(kHeaders)]: [Object],
[Symbol(kHeadersCount)]: 22,
[Symbol(kTrailers)]: null,
[Symbol(kTrailersCount)]: 0
},
aborted: false,
timeoutCb: [Function: emitRequestTimeout],
upgradeOrConnect: false,
parser: null,
maxHeadersCount: null,
reusedSocket: false,
host: ‘localhost’,
protocol: ‘http:’,
_redirectable: Writable {
_events: [Object],
_writableState: [WritableState],
_maxListeners: undefined,
_options: [Object],
_ended: true,
_ending: true,
_redirectCount: 0,
_redirects: ,
_requestBodyLength: 828,
_requestBodyBuffers: ,
_eventsCount: 3,
_onNativeResponse: [Function (anonymous)],
_currentRequest: [Circular *1],
_currentUrl: ‘http://localhost:8088/v1/esignet/oauth/v2/token’,
[Symbol(shapeMode)]: true,
[Symbol(kCapture)]: false
},
[Symbol(shapeMode)]: false,
[Symbol(kCapture)]: false,
[Symbol(kBytesWritten)]: 0,
[Symbol(kNeedDrain)]: false,
[Symbol(corked)]: 0,
[Symbol(kOutHeaders)]: [Object: null prototype] {
accept: [Array],
‘content-type’: [Array],
‘user-agent’: [Array],
‘content-length’: [Array],
‘accept-encoding’: [Array],
host: [Array]
},
[Symbol(errored)]: null,
[Symbol(kHighWaterMark)]: 16384,
[Symbol(kRejectNonStandardBodyWrites)]: false,
[Symbol(kUniqueHeaders)]: null
},
response: {
status: 400,
statusText: ‘’,
headers: AxiosHeaders {
‘set-cookie’: [Array],
‘x-content-type-options’: ‘nosniff’,
‘x-xss-protection’: ‘1; mode=block’,
‘cache-control’: ‘no-cache, no-store, max-age=0, must-revalidate’,
pragma: ‘no-cache’,
expires: ‘0’,
‘x-frame-options’: ‘DENY’,
‘content-type’: ‘application/json’,
‘transfer-encoding’: ‘chunked’,
date: ‘Tue, 30 Jul 2024 13:43:42 GMT’,
connection: ‘close’,
[Symbol(defaults)]: null
},
config: {
transitional: [Object],
adapter: [Function: httpAdapter],
transformRequest: [Array],
transformResponse: [Array],
timeout: 0,
xsrfCookieName: ‘XSRF-TOKEN’,
xsrfHeaderName: ‘X-XSRF-TOKEN’,
maxContentLength: -1,
maxBodyLength: -1,
env: [Object],
validateStatus: [Function: validateStatus],
headers: [AxiosHeaders],
method: ‘post’,
url: ‘http://localhost:8088/v1/esignet/oauth/v2/token’,
data: ‘code=6mqg3QMoE9QnOyWloRsZf58CuEde2E0RJcPBFnyPuWQ&client_id=healthservices&redirect_uri=http%3A%2F%2Flocalhost%3A5000%2Fuserprofile&grant_type=authorization_code&client_assertion_type=urn%3Aietf%3Aparams%3Aoauth%3Aclient-assertion-type%3Ajwt-bearer&client_assertion=eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJoZWFsdGhzZXJ2aWNlcyIsInN1YiI6ImhlYWx0aHNlcnZpY2VzIiwiYXVkIjoiaHR0cDovL2xvY2FsaG9zdDo4MDg4L3YxL2VzaWduZXQvb2F1dGgvdjIvdG9rZW4iLCJpYXQiOjE3MjIzNDcwMjIsImV4cCI6MTcyMjM1MDYyMn0.GqINoWtSZ-IsbExVJm_ZnovLfMJycSKhr_JXNN6TLvhMPfwhcvGL16cmhp_aYKHoYhrSUBKIS7e9RfaVJfn1JZFxoFHoO67Tcd14nbnLVoMHMX5AF5BHRZf9nJAF9ZexuMjZxeKqejf2Y8RUj56xu3kdtDXDLmqC7vc9zuUgiGamwXPuZa2ZPIQ9UkhS9BbeH7Is08pfLblHyHQpqCkh44YbbzUEngxDustQXWats5PBpMPDVcgMaxBHAicnB1qgPBEZ61zUllZztSoTCdFB2gcMQNVE-xoJxCKnn9AhfPOpZ33CLbZOoYsG2wil6lLDVmmmORMt98rMGVAS0F5z-w’
},
request: <ref *1> ClientRequest {
_events: [Object: null prototype],
_eventsCount: 7,
_maxListeners: undefined,
outputData: ,
outputSize: 0,
writable: true,
destroyed: false,
_last: false,
chunkedEncoding: false,
shouldKeepAlive: false,
maxRequestsOnConnectionReached: false,
_defaultKeepAlive: true,
useChunkedEncodingByDefault: true,
sendDate: false,
_removedConnection: false,
_removedContLen: false,
_removedTE: false,
strictContentLength: false,
_contentLength: ‘828’,
_hasBody: true,
_trailer: ‘’,
finished: true,
_headerSent: true,
_closed: false,
socket: [Socket],
_header: ‘POST /v1/esignet/oauth/v2/token HTTP/1.1\r\n’ +
‘Accept: application/json, text/plain, /\r\n’ +
‘Content-Type: application/x-www-form-urlencoded\r\n’ +
‘User-Agent: axios/1.1.3\r\n’ +
‘Content-Length: 828\r\n’ +
‘Accept-Encoding: gzip, deflate, br\r\n’ +
‘Host: localhost:8088\r\n’ +
‘Connection: keep-alive\r\n’ +
‘\r\n’,
_keepAliveTimeout: 0,
_onPendingData: [Function: nop],
agent: [Agent],
socketPath: undefined,
method: ‘POST’,
maxHeaderSize: undefined,
insecureHTTPParser: undefined,
joinDuplicateHeaders: undefined,
path: ‘/v1/esignet/oauth/v2/token’,
_ended: true,
res: [IncomingMessage],
aborted: false,
timeoutCb: [Function: emitRequestTimeout],
upgradeOrConnect: false,
parser: null,
maxHeadersCount: null,
reusedSocket: false,
host: ‘localhost’,
protocol: ‘http:’,
_redirectable: [Writable],
[Symbol(shapeMode)]: false,
[Symbol(kCapture)]: false,
[Symbol(kBytesWritten)]: 0,
[Symbol(kNeedDrain)]: false,
[Symbol(corked)]: 0,
[Symbol(kOutHeaders)]: [Object: null prototype],
[Symbol(errored)]: null,
[Symbol(kHighWaterMark)]: 16384,
[Symbol(kRejectNonStandardBodyWrites)]: false,
[Symbol(kUniqueHeaders)]: null
},
data: {
error: ‘invalid_client_id’,
error_description: ‘invalid_client_id’
}
}
}
AxiosError: Request failed with status code 400
at settle (C:\Users\MICHAEL\Desktop\new\esignet-mock-services\esignet-mock-services\mock-relying-party-service\node_modules\axios\dist\node\axios.cjs:1268:12)
at IncomingMessage.handleStreamEnd (C:\Users\MICHAEL\Desktop\new\esignet-mock-services\esignet-mock-services\mock-relying-party-service\node_modules\axios\dist\node\axios.cjs:2446:11)
at IncomingMessage.emit (node:events:531:35)
at endReadableNT (node:internal/streams/readable:1696:12)
at process.processTicksAndRejections (node:internal/process/task_queues:82:21) {
code: ‘ERR_BAD_REQUEST’,
config: {
transitional: {
silentJSONParsing: true,
forcedJSONParsing: true,
clarifyTimeoutError: false
},
adapter: [Function: httpAdapter],
transformRequest: [ [Function: transformRequest] ],
transformResponse: [ [Function: transformResponse] ],
timeout: 0,
xsrfCookieName: ‘XSRF-TOKEN’,
xsrfHeaderName: ‘X-XSRF-TOKEN’,
maxContentLength: -1,
maxBodyLength: -1,
env: { FormData: [Function], Blob: [class Blob] },
validateStatus: [Function: validateStatus],
headers: AxiosHeaders {
‘Content-Type’: ‘application/x-www-form-urlencoded’,
‘User-Agent’: ‘axios/1.1.3’,
‘Content-Length’: ‘828’,
‘Accept-Encoding’: ‘gzip, deflate, br’,
[Symbol(defaults)]: [Object]
},
method: ‘post’,
url: ‘http://localhost:8088/v1/esignet/oauth/v2/token’,
data: ‘code=6mqg3QMoE9QnOyWloRsZf58CuEde2E0RJcPBFnyPuWQ&client_id=healthservices&redirect_uri=http%3A%2F%2Flocalhost%3A5000%2Fuserprofile&grant_type=authorization_code&client_assertion_type=urn%3Aietf%3Aparams%3Aoauth%3Aclient-assertion-type%3Ajwt-bearer&client_assertion=eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJoZWFsdGhzZXJ2aWNlcyIsInN1YiI6ImhlYWx0aHNlcnZpY2VzIiwiYXVkIjoiaHR0cDovL2xvY2FsaG9zdDo4MDg4L3YxL2VzaWduZXQvb2F1dGgvdjIvdG9rZW4iLCJpYXQiOjE3MjIzNDcwMjIsImV4cCI6MTcyMjM1MDYyMn0.GqINoWtSZ-IsbExVJm_ZnovLfMJycSKhr_JXNN6TLvhMPfwhcvGL16cmhp_aYKHoYhrSUBKIS7e9RfaVJfn1JZFxoFHoO67Tcd14nbnLVoMHMX5AF5BHRZf9nJAF9ZexuMjZxeKqejf2Y8RUj56xu3kdtDXDLmqC7vc9zuUgiGamwXPuZa2ZPIQ9UkhS9BbeH7Is08pfLblHyHQpqCkh44YbbzUEngxDustQXWats5PBpMPDVcgMaxBHAicnB1qgPBEZ61zUllZztSoTCdFB2gcMQNVE-xoJxCKnn9AhfPOpZ33CLbZOoYsG2wil6lLDVmmmORMt98rMGVAS0F5z-w’
},
request: <ref *1> ClientRequest {
_events: [Object: null prototype] {
abort: [Function (anonymous)],
aborted: [Function (anonymous)],
connect: [Function (anonymous)],
error: [Function (anonymous)],
socket: [Function (anonymous)],
timeout: [Function (anonymous)],
finish: [Function: requestOnFinish]
},
_eventsCount: 7,
_maxListeners: undefined,
outputData: ,
outputSize: 0,
writable: true,
destroyed: false,
_last: false,
chunkedEncoding: false,
shouldKeepAlive: false,
maxRequestsOnConnectionReached: false,
_defaultKeepAlive: true,
useChunkedEncodingByDefault: true,
sendDate: false,
_removedConnection: false,
_removedContLen: false,
_removedTE: false,
strictContentLength: false,
_contentLength: ‘828’,
_hasBody: true,
_trailer: ‘’,
finished: true,
_headerSent: true,
_closed: false,
socket: Socket {
connecting: false,
_hadError: false,
_parent: null,
_host: ‘localhost’,
_closeAfterHandlingError: false,
_events: [Object],
_readableState: [ReadableState],
_writableState: [WritableState],
allowHalfOpen: false,
_maxListeners: undefined,
_eventsCount: 7,
_sockname: null,
_pendingData: null,
_pendingEncoding: ‘’,
server: null,
_server: null,
timeout: 5000,
parser: null,
_httpMessage: [Circular *1],
autoSelectFamilyAttemptedAddresses: [Array],
[Symbol(async_id_symbol)]: 63,
[Symbol(kHandle)]: [TCP],
[Symbol(lastWriteQueueSize)]: 0,
[Symbol(timeout)]: Timeout {
_idleTimeout: 5000,
_idlePrev: [TimersList],
_idleNext: [Timeout],
_idleStart: 1711352,
_onTimeout: [Function: bound ],
_timerArgs: undefined,
_repeat: null,
_destroyed: false,
[Symbol(refed)]: false,
[Symbol(kHasPrimitive)]: false,
[Symbol(asyncId)]: 62,
[Symbol(triggerId)]: 0
},
[Symbol(kBuffer)]: null,
[Symbol(kBufferCb)]: null,
[Symbol(kBufferGen)]: null,
[Symbol(shapeMode)]: true,
[Symbol(kCapture)]: false,
[Symbol(kSetNoDelay)]: true,
[Symbol(kSetKeepAlive)]: true,
[Symbol(kSetKeepAliveInitialDelay)]: 60,
[Symbol(kBytesRead)]: 0,
[Symbol(kBytesWritten)]: 0
},
_header: ‘POST /v1/esignet/oauth/v2/token HTTP/1.1\r\n’ +
‘Accept: application/json, text/plain, /\r\n’ +
‘Content-Type: application/x-www-form-urlencoded\r\n’ +
‘User-Agent: axios/1.1.3\r\n’ +
‘Content-Length: 828\r\n’ +
‘Accept-Encoding: gzip, deflate, br\r\n’ +
‘Host: localhost:8088\r\n’ +
‘Connection: keep-alive\r\n’ +
‘\r\n’,
_keepAliveTimeout: 0,
_onPendingData: [Function: nop],
agent: Agent {
_events: [Object: null prototype],
_eventsCount: 2,
_maxListeners: undefined,
defaultPort: 80,
protocol: ‘http:’,
options: [Object: null prototype],
requests: [Object: null prototype] {},
sockets: [Object: null prototype],
freeSockets: [Object: null prototype] {},
keepAliveMsecs: 1000,
keepAlive: true,
maxSockets: Infinity,
maxFreeSockets: 256,
scheduling: ‘lifo’,
maxTotalSockets: Infinity,
totalSocketCount: 2,
[Symbol(shapeMode)]: false,
[Symbol(kCapture)]: false
},
socketPath: undefined,
method: ‘POST’,
maxHeaderSize: undefined,
insecureHTTPParser: undefined,
joinDuplicateHeaders: undefined,
path: ‘/v1/esignet/oauth/v2/token’,
_ended: true,
res: IncomingMessage {
_events: [Object],
_readableState: [ReadableState],
_maxListeners: undefined,
socket: [Socket],
httpVersionMajor: 1,
httpVersionMinor: 1,
httpVersion: ‘1.1’,
complete: true,
rawHeaders: [Array],
rawTrailers: ,
joinDuplicateHeaders: undefined,
aborted: false,
upgrade: false,
url: ‘’,
method: null,
statusCode: 400,
statusMessage: ‘’,
client: [Socket],
_consuming: true,
_dumped: false,
req: [Circular *1],
_eventsCount: 4,
responseUrl: ‘http://localhost:8088/v1/esignet/oauth/v2/token’,
redirects: ,
[Symbol(shapeMode)]: true,
[Symbol(kCapture)]: false,
[Symbol(kHeaders)]: [Object],
[Symbol(kHeadersCount)]: 22,
[Symbol(kTrailers)]: null,
[Symbol(kTrailersCount)]: 0
},
aborted: false,
timeoutCb: [Function: emitRequestTimeout],
upgradeOrConnect: false,
parser: null,
maxHeadersCount: null,
reusedSocket: false,
host: ‘localhost’,
protocol: ‘http:’,
_redirectable: Writable {
_events: [Object],
_writableState: [WritableState],
_maxListeners: undefined,
_options: [Object],
_ended: true,
_ending: true,
_redirectCount: 0,
_redirects: ,
_requestBodyLength: 828,
_requestBodyBuffers: ,
_eventsCount: 3,
_onNativeResponse: [Function (anonymous)],
_currentRequest: [Circular *1],
_currentUrl: ‘http://localhost:8088/v1/esignet/oauth/v2/token’,
[Symbol(shapeMode)]: true,
[Symbol(kCapture)]: false
},
[Symbol(shapeMode)]: false,
[Symbol(kCapture)]: false,
[Symbol(kBytesWritten)]: 0,
[Symbol(kNeedDrain)]: false,
[Symbol(corked)]: 0,
[Symbol(kOutHeaders)]: [Object: null prototype] {
accept: [Array],
‘content-type’: [Array],
‘user-agent’: [Array],
‘content-length’: [Array],
‘accept-encoding’: [Array],
host: [Array]
},
[Symbol(errored)]: null,
[Symbol(kHighWaterMark)]: 16384,
[Symbol(kRejectNonStandardBodyWrites)]: false,
[Symbol(kUniqueHeaders)]: null
},
response: {
status: 400,
statusText: ‘’,
headers: AxiosHeaders {
‘set-cookie’: [Array],
‘x-content-type-options’: ‘nosniff’,
‘x-xss-protection’: ‘1; mode=block’,
‘cache-control’: ‘no-cache, no-store, max-age=0, must-revalidate’,
pragma: ‘no-cache’,
expires: ‘0’,
‘x-frame-options’: ‘DENY’,
‘content-type’: ‘application/json’,
‘transfer-encoding’: ‘chunked’,
date: ‘Tue, 30 Jul 2024 13:43:42 GMT’,
connection: ‘close’,
[Symbol(defaults)]: null
},
config: {
transitional: [Object],
adapter: [Function: httpAdapter],
transformRequest: [Array],
transformResponse: [Array],
timeout: 0,
xsrfCookieName: ‘XSRF-TOKEN’,
xsrfHeaderName: ‘X-XSRF-TOKEN’,
maxContentLength: -1,
maxBodyLength: -1,
env: [Object],
validateStatus: [Function: validateStatus],
headers: [AxiosHeaders],
method: ‘post’,
url: ‘http://localhost:8088/v1/esignet/oauth/v2/token’,
data: ‘code=6mqg3QMoE9QnOyWloRsZf58CuEde2E0RJcPBFnyPuWQ&client_id=healthservices&redirect_uri=http%3A%2F%2Flocalhost%3A5000%2Fuserprofile&grant_type=authorization_code&client_assertion_type=urn%3Aietf%3Aparams%3Aoauth%3Aclient-assertion-type%3Ajwt-bearer&client_assertion=eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJoZWFsdGhzZXJ2aWNlcyIsInN1YiI6ImhlYWx0aHNlcnZpY2VzIiwiYXVkIjoiaHR0cDovL2xvY2FsaG9zdDo4MDg4L3YxL2VzaWduZXQvb2F1dGgvdjIvdG9rZW4iLCJpYXQiOjE3MjIzNDcwMjIsImV4cCI6MTcyMjM1MDYyMn0.GqINoWtSZ-IsbExVJm_ZnovLfMJycSKhr_JXNN6TLvhMPfwhcvGL16cmhp_aYKHoYhrSUBKIS7e9RfaVJfn1JZFxoFHoO67Tcd14nbnLVoMHMX5AF5BHRZf9nJAF9ZexuMjZxeKqejf2Y8RUj56xu3kdtDXDLmqC7vc9zuUgiGamwXPuZa2ZPIQ9UkhS9BbeH7Is08pfLblHyHQpqCkh44YbbzUEngxDustQXWats5PBpMPDVcgMaxBHAicnB1qgPBEZ61zUllZztSoTCdFB2gcMQNVE-xoJxCKnn9AhfPOpZ33CLbZOoYsG2wil6lLDVmmmORMt98rMGVAS0F5z-w’
},
request: <ref *1> ClientRequest {
_events: [Object: null prototype],
_eventsCount: 7,
_maxListeners: undefined,
outputData: ,
outputSize: 0,
writable: true,
destroyed: false,
_last: false,
chunkedEncoding: false,
shouldKeepAlive: false,
maxRequestsOnConnectionReached: false,
_defaultKeepAlive: true,
useChunkedEncodingByDefault: true,
sendDate: false,
_removedConnection: false,
_removedContLen: false,
_removedTE: false,
strictContentLength: false,
_contentLength: ‘828’,
_hasBody: true,
_trailer: ‘’,
finished: true,
_headerSent: true,
_closed: false,
socket: [Socket],
_header: ‘POST /v1/esignet/oauth/v2/token HTTP/1.1\r\n’ +
‘Accept: application/json, text/plain, /\r\n’ +
‘Content-Type: application/x-www-form-urlencoded\r\n’ +
‘User-Agent: axios/1.1.3\r\n’ +
‘Content-Length: 828\r\n’ +
‘Accept-Encoding: gzip, deflate, br\r\n’ +
‘Host: localhost:8088\r\n’ +
‘Connection: keep-alive\r\n’ +
‘\r\n’,
_keepAliveTimeout: 0,
_onPendingData: [Function: nop],
agent: [Agent],
socketPath: undefined,
method: ‘POST’,
maxHeaderSize: undefined,
insecureHTTPParser: undefined,
joinDuplicateHeaders: undefined,
path: ‘/v1/esignet/oauth/v2/token’,
_ended: true,
res: [IncomingMessage],
aborted: false,
timeoutCb: [Function: emitRequestTimeout],
upgradeOrConnect: false,
parser: null,
maxHeadersCount: null,
reusedSocket: false,
host: ‘localhost’,
protocol: ‘http:’,
_redirectable: [Writable],
[Symbol(shapeMode)]: false,
[Symbol(kCapture)]: false,
[Symbol(kBytesWritten)]: 0,
[Symbol(kNeedDrain)]: false,
[Symbol(corked)]: 0,
[Symbol(kOutHeaders)]: [Object: null prototype],
[Symbol(errored)]: null,
[Symbol(kHighWaterMark)]: 16384,
[Symbol(kRejectNonStandardBodyWrites)]: false,
[Symbol(kUniqueHeaders)]: null
},
data: {
error: ‘invalid_client_id’,
error_description: ‘invalid_client_id’
}
}
}

Dear @zesu2210
Could you please provide a prompt response, as I am under urgent time constraints?

with regards.

Dear @Michael ,

Apologies on delayed response, @zesu2210 will be helping you out here shortly.

Regards
Team MOSIP

Dear @Michael ,

Accept my apologies for delayed response. We are figuring out what could be the problem by replicating the issue, that’s why it took so long.

In esignet-service folder, you can find application-local.properties, in there you can change this token_enpoint value, from oauth/token to oauth/v2/token.

Thanks & Regards

1 Like

Dear @Michael ,

Can you please let me know your mock-identity-system version number as well?

Thanks & Regards

1 Like

Dear @zesu2210
I am using mock-identity-system v0.9.3

Thanks & Regards

Dear @team_mosip @zesu2210 @keshavs
Could you please provide me with an update on the matter? I am still encountering the same issue.

With Regards

Dear @Michael ,
Did you try this OIDC UI REDIRECT IN TO Relying party UI (Health Portal) Problem - #10 by zesu2210

Hello @Michael

Please share the esignet service logs, it’s 400 bad request, seems like client assertion has failed.

regards

Dear @zesu2210
Yes Sir, I AM Tring This.

With Regards

Dear @Anusha_sunkadh

Here are a few of my log console entries; the others are similar to these.



With Regards.

Dear @Anusha_sunkadh
Here is My Esignet Service Log throughout the whole process.esignet_Service_log.pdf

:point_right: Send OTP Started ON LOG line_number 542

With Regards.

Dear @
And Here is My mock-reling-party-service Log throughout the whole process.

(Attachment mock-relying-party-service_LOG.txt is missing)

Microsoft Windows [Version 10.0.22631.3880]
(c) Microsoft Corporation. All rights reserved.

C:\Users\MICHAEL\Desktop\new\esignet-mock-services\esignet-mock-services\mock-relying-party-service>npm start

mock-relying-party-server@1.0.0 start
node app.js

Listening on port 8888…
TypeError: Invalid time period format
at exports.default (C:\Users\MICHAEL\Desktop\new\esignet-mock-services\esignet-mock-services\mock-relying-party-service\node_modules\jose\dist\node\cjs\lib\secs.js:12:15)
at SignJWT.setExpirationTime (C:\Users\MICHAEL\Desktop\new\esignet-mock-services\esignet-mock-services\mock-relying-party-service\node_modules\jose\dist\node\cjs\jwt\produce.js:44:114)
at generateSignedJwt (C:\Users\MICHAEL\Desktop\new\esignet-mock-services\esignet-mock-services\mock-relying-party-service\esignetService.js:89:6)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async post_GetToken (C:\Users\MICHAEL\Desktop\new\esignet-mock-services\esignet-mock-services\mock-relying-party-service\esignetService.js:33:23)
at async C:\Users\MICHAEL\Desktop\new\esignet-mock-services\esignet-mock-services\mock-relying-party-service\app.js:14:27
TypeError: Invalid time period format
at exports.default (C:\Users\MICHAEL\Desktop\new\esignet-mock-services\esignet-mock-services\mock-relying-party-service\node_modules\jose\dist\node\cjs\lib\secs.js:12:15)
at SignJWT.setExpirationTime (C:\Users\MICHAEL\Desktop\new\esignet-mock-services\esignet-mock-services\mock-relying-party-service\node_modules\jose\dist\node\cjs\jwt\produce.js:44:114)
at generateSignedJwt (C:\Users\MICHAEL\Desktop\new\esignet-mock-services\esignet-mock-services\mock-relying-party-service\esignetService.js:89:6)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async post_GetToken (C:\Users\MICHAEL\Desktop\new\esignet-mock-services\esignet-mock-services\mock-relying-party-service\esignetService.js:33:23)
at async C:\Users\MICHAEL\Desktop\new\esignet-mock-services\esignet-mock-services\mock-relying-party-service\app.js:14:27

With Regards