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() {
25
25
const locSearch = queryString . parse ( document . location . search . substr ( 1 ) ) ;
26
26
const locHash = queryString . parse ( document . location . hash . substr ( 1 ) ) ;
27
27
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
+ }
38
38
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
+ }
43
44
}
44
45
45
46
function pickEbookOrExtensionBanner ( ) {
You can’t perform that action at this time.
0 commit comments