Skip to content

Commit 83be3ad

Browse files
committed
Fix public key loading for tokens in location hash.
1 parent 7656f65 commit 83be3ad

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

src/website/index.js

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,8 @@ import { setupSmoothScrolling } from './smooth-scrolling.js';
88
import { setupHighlighting } from './highlighting.js';
99
import { isChrome, isFirefox } from './utils.js';
1010
import { setupShareJwtButton } from '../share-button.js';
11-
import {
12-
publicKeyTextArea,
13-
codeElements,
11+
import {
12+
publicKeyTextArea,
1413
debuggerSection,
1514
extensionSection,
1615
ebookSection,
@@ -27,7 +26,7 @@ function parseLocationQuery() {
2726
const locHash = queryString.parse(document.location.hash.substr(1));
2827

2928
const keys = [
30-
'id_token',
29+
'id_token',
3130
'access_token',
3231
'value',
3332
'token',
@@ -39,8 +38,8 @@ function parseLocationQuery() {
3938
if(token) {
4039
setTokenEditorValue(token);
4140

42-
if(locSearch.publicKey) {
43-
publicKeyTextArea.value = locSearch.publicKey;
41+
if(locSearch.publicKey || locHash.publicKey) {
42+
publicKeyTextArea.value = locSearch.publicKey || locHash.publicKey;
4443
}
4544

4645
debuggerSection.scrollIntoView(true);

0 commit comments

Comments
 (0)