@@ -89,6 +89,7 @@ describe('fetchServerConfig (OAuth)', () => {
8989 authorization_endpoint : 'https://example.com/oauth/authorize' ,
9090 token_endpoint : 'https://example.com/oauth/token' ,
9191 response_types_supported : [ 'code' ] ,
92+ scopes_supported : [ 'scope1' , 'scope2' , 'scope3' ] ,
9293 } ) ;
9394
9495 it ( 'should fetch server config using the well-known URL for OAuth' , async ( ) => {
@@ -103,6 +104,7 @@ describe('fetchServerConfig (OAuth)', () => {
103104 authorizationEndpoint : 'https://example.com/oauth/authorize' ,
104105 tokenEndpoint : 'https://example.com/oauth/token' ,
105106 responseTypesSupported : [ 'code' ] ,
107+ scopesSupported : [ 'scope1' , 'scope2' , 'scope3' ] ,
106108 } ,
107109 } ) ;
108110 expect ( wellKnown . isDone ( ) ) . toBe ( true ) ;
@@ -120,6 +122,7 @@ describe('fetchServerConfig (OAuth)', () => {
120122 authorizationEndpoint : 'https://example.com/oauth/authorize' ,
121123 tokenEndpoint : 'https://example.com/oauth/token' ,
122124 responseTypesSupported : [ 'code' ] ,
125+ scopesSupported : [ 'scope1' , 'scope2' , 'scope3' ] ,
123126 } ,
124127 } ) ;
125128 expect ( wellKnown . isDone ( ) ) . toBe ( true ) ;
@@ -135,6 +138,7 @@ describe('fetchServerConfig (OIDC)', () => {
135138 authorization_endpoint : 'https://example.com/authorize' ,
136139 token_endpoint : 'https://example.com/token' ,
137140 response_types_supported : [ 'code' ] ,
141+ scopes_supported : [ 'openid' , 'profile' , 'email' ] ,
138142 } ) ;
139143 const config = await fetchServerConfig ( 'https://example.com' , { type : 'oidc' } ) ;
140144 expect ( config ) . toEqual ( {
@@ -144,6 +148,7 @@ describe('fetchServerConfig (OIDC)', () => {
144148 authorizationEndpoint : 'https://example.com/authorize' ,
145149 tokenEndpoint : 'https://example.com/token' ,
146150 responseTypesSupported : [ 'code' ] ,
151+ scopesSupported : [ 'openid' , 'profile' , 'email' ] ,
147152 } ,
148153 } ) ;
149154 expect ( wellKnown . isDone ( ) ) . toBe ( true ) ;
0 commit comments