Closed adriatic closed 5 years ago
If you haven't fixed this by now, the issue is in the OktaJwtVerifier function:
const oktaJwtVerifier = new OktaJwtVerifier({ issuer: sampleConfig.resourceServer.oidc.issuer, assertClaims: sampleConfig.resourceServer.assertClaims });
should actually include the clientId key, like so:
const oktaJwtVerifier = new OktaJwtVerifier({ issuer: sampleConfig.resourceServer.oidc.issuer, clientId: {clientid}, assertClaims: sampleConfig.resourceServer.assertClaims });
Hope this helps some.
Hi @SPNexus - frankly, I gave up on this, correctly concluding that Okta does not care about having their sample code tested and verified. Three months of silence is enough to make such conclusion 😄
Closing this as the sample has been updated to reflect the correct requirements.
This issue describes the failure of the Express Resource Server Example, where the command
npm run resource-server
results withThe gist of this failure is described as
Error: Your client ID is missing
.I believe that the data in the file
.samples.config.json
are correct - in particular, theclient ID
is set to0oah36nrrdAZ7r4a00h7
- as defined athttps://dev-621259-admin.oktapreview.com/admin/app/oidc_client/instance/0oah36nrrdAZ7r4a00h7/#tab-general
- and the only possible problem that I can see is the use of the key "cid" to refer to client ID in the "assertClaims"section (shown below):Am I missing something obvious?