@@ -171,6 +171,7 @@ describe("OpenSeaOAuth", () => {
171171 expect ( token . accessToken ) . toBe ( "at" )
172172 expect ( token . refreshToken ) . toBe ( "rt" )
173173 expect ( token . scopes ) . toEqual ( [ "read:eligibility" , "write:orders" ] )
174+ expect ( token . scopeSource ) . toBe ( "authorization_server" )
174175 expect ( token . expiresAt . getTime ( ) ) . toBeGreaterThan ( Date . now ( ) )
175176 } )
176177
@@ -237,6 +238,7 @@ describe("OpenSeaOAuth", () => {
237238 } )
238239
239240 expect ( token . scopes ) . toEqual ( [ "read:eligibility" , "write:orders" ] )
241+ expect ( token . scopeSource ) . toBe ( "jwt_claim" )
240242 } )
241243
242244 test ( "reads array OpenSea scope claims in canonical API order" , async ( ) => {
@@ -262,6 +264,7 @@ describe("OpenSeaOAuth", () => {
262264 } )
263265
264266 expect ( token . scopes ) . toEqual ( [ "read:favorites" , "write:favorites" ] )
267+ expect ( token . scopeSource ) . toBe ( "jwt_claim" )
265268 } )
266269
267270 test ( "filters token response scopes through the OpenAPI catalog" , async ( ) => {
@@ -286,6 +289,7 @@ describe("OpenSeaOAuth", () => {
286289 } )
287290
288291 expect ( token . scopes ) . toEqual ( [ "read:eligibility" ] )
292+ expect ( token . scopeSource ) . toBe ( "authorization_server" )
289293 } )
290294
291295 test . each ( [
@@ -315,6 +319,7 @@ describe("OpenSeaOAuth", () => {
315319 } )
316320
317321 expect ( token . scopes ) . toEqual ( [ ] )
322+ expect ( token . scopeSource ) . toBe ( "jwt_claim" )
318323 } )
319324
320325 test ( "refresh uses the refresh_token grant" , async ( ) => {
@@ -337,6 +342,7 @@ describe("OpenSeaOAuth", () => {
337342 expect ( token . accessToken ) . toBe ( "at2" )
338343 expect ( token . refreshToken ) . toBe ( "rt2" )
339344 expect ( token . scopes ) . toEqual ( [ ] )
345+ expect ( token . scopeSource ) . toBe ( "jwt_claim" )
340346 } )
341347
342348 test ( "refresh retains the previous token when rotation omits one" , async ( ) => {
0 commit comments