File tree Expand file tree Collapse file tree 1 file changed +15
-14
lines changed Expand file tree Collapse file tree 1 file changed +15
-14
lines changed Original file line number Diff line number Diff line change @@ -25,21 +25,22 @@ function parseLocationQuery() {
2525 const locSearch = queryString . parse ( document . location . search . substr ( 1 ) ) ;
2626 const locHash = queryString . parse ( document . location . hash . substr ( 1 ) ) ;
2727
28- const token = locSearch . id_token ||
29- locSearch . access_token ||
30- locSearch . value ||
31- locSearch . token ;
32- if ( token ) {
33- setTokenEditorValue ( token ) ;
34-
35- if ( locSearch . publicKey ) {
36- publicKeyTextArea . value = locSearch . publicKey ;
37- }
28+ const keys = [ ' id_token' , 'access_token' , 'value' , 'token' ] ;
29+ for ( const key of keys ) {
30+ const token = locSearch [ key ] || locHash [ key ] ;
31+
32+ if ( token ) {
33+ setTokenEditorValue ( token ) ;
34+
35+ if ( locSearch . publicKey ) {
36+ publicKeyTextArea . value = locSearch . publicKey ;
37+ }
3838
39- debuggerSection . scrollIntoView ( true ) ;
40- } else if ( locHash . token ) { // Legacy token passing method (as hash)
41- setTokenEditorValue ( locHash . token ) ;
42- }
39+ debuggerSection . scrollIntoView ( true ) ;
40+
41+ break ;
42+ }
43+ }
4344}
4445
4546function pickEbookOrExtensionBanner ( ) {
You can’t perform that action at this time.
0 commit comments