diff --git a/dev-helpers/oauth2-redirect.html b/dev-helpers/oauth2-redirect.html
index 0f4d4953d47..87a2eed8f5e 100644
--- a/dev-helpers/oauth2-redirect.html
+++ b/dev-helpers/oauth2-redirect.html
@@ -12,7 +12,7 @@
var isValid, qp, arr;
if (/code|token|error/.test(window.location.hash)) {
- qp = window.location.hash.substring(1);
+ qp = window.location.hash.substring(1).replace('?', '&');
} else {
qp = location.search.substring(1);
}
diff --git a/dist/oauth2-redirect.html b/dist/oauth2-redirect.html
index 9a25c9e88b5..56409171811 100644
--- a/dist/oauth2-redirect.html
+++ b/dist/oauth2-redirect.html
@@ -13,7 +13,7 @@
var isValid, qp, arr;
if (/code|token|error/.test(window.location.hash)) {
- qp = window.location.hash.substring(1);
+ qp = window.location.hash.substring(1).replace('?', '&');
} else {
qp = location.search.substring(1);
}