Skip to content

Commit 3377286

Browse files
authored
update default scopes_supported
added `openid` and `offline_access`
2 parents c75d60a + f0eb9fa commit 3377286

2 files changed

Lines changed: 10 additions & 1 deletion

File tree

src/Provider.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,10 @@ const DEFAULT_GRANT_TYPES_SUPPORTED = [
3333
'refresh_token',
3434
'client_credentials'
3535
]
36+
const DEFAULT_SCOPES_SUPPORTED = [
37+
'openid',
38+
'offline_access'
39+
]
3640
const DEFAULT_SUBJECT_TYPES_SUPPORTED = ['public']
3741

3842
const DEFAULT_TOKEN_TYPES_SUPPORTED = ['legacyPop', 'dpop']
@@ -53,7 +57,8 @@ class Provider {
5357

5458
this.issuer = data.issuer
5559
this.jwks_uri = data.jwks_uri
56-
this.scopes_supported = data.scopes_supported
60+
this.scopes_supported = data.scopes_supported ||
61+
DEFAULT_SCOPES_SUPPORTED
5762
this.response_types_supported = data.response_types_supported ||
5863
DEFAULT_RESPONSE_TYPES_SUPPORTED
5964
this.token_types_supported = data.token_types_supported ||

test/config/provider.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,10 @@
2424
"refresh_token",
2525
"client_credentials"
2626
],
27+
"scopes_supported": [
28+
"openid",
29+
"offline_access"
30+
],
2731
"subject_types_supported": [
2832
"public"
2933
],

0 commit comments

Comments
 (0)