Skip to content

Commit 0ccf0e5

Browse files
committed
TimothyJones#14 - Fix for Autodiscovery issue
Placing the `jwks.json` endpoint under `/.well-known/` makes the whole shim autodiscoverable by AWS Cognito This is also the default location as per https://auth0.com/docs/jwks
1 parent 9d857c3 commit 0ccf0e5

File tree

4 files changed

+4
-6
lines changed

4 files changed

+4
-6
lines changed

README.md

+1-3
Original file line numberDiff line numberDiff line change
@@ -253,9 +253,7 @@ A full OpenID implementation would also include:
253253

254254
**Known issues**
255255

256-
If deployed via lambda, Cognito can't seem to use the discovery endpoint.
257-
However, the endpoints can be specified manually as described in the getting
258-
started instructions.
256+
none
259257

260258
## Extending
261259

src/openid.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ const getConfigFor = host => ({
9292
userinfo_endpoint: `https://${host}/userinfo`,
9393
// check_session_iframe: 'https://server.example.com/connect/check_session',
9494
// end_session_endpoint: 'https://server.example.com/connect/end_session',
95-
jwks_uri: `https://${host}/jwks.json`,
95+
jwks_uri: `https://${host}/.well-known/jwks.json`,
9696
// registration_endpoint: 'https://server.example.com/connect/register',
9797
scopes_supported: ['openid', 'read:user', 'user:email'],
9898
response_types_supported: [

src/openid.test.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ describe('openid domain layer', () => {
155155
display_values_supported: ['page', 'popup'],
156156
id_token_signing_alg_values_supported: ['RS256'],
157157
issuer: 'https://not-a-real-host.com',
158-
jwks_uri: 'https://not-a-real-host.com/jwks.json',
158+
jwks_uri: 'https://not-a-real-host.com/.well-known/jwks.json',
159159
request_object_signing_alg_values_supported: ['none'],
160160
response_types_supported: [
161161
'code',

template.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ Resources:
8989
GetResource:
9090
Type: Api
9191
Properties:
92-
Path: /jwks.json
92+
Path: /.well-known/jwks.json
9393
Method: get
9494

9595
Outputs:

0 commit comments

Comments
 (0)