diff --git a/well-known/oauth3/index.html b/well-known/oauth3/index.html
index a3d6c62..811ba0e 100644
--- a/well-known/oauth3/index.html
+++ b/well-known/oauth3/index.html
@@ -107,10 +107,9 @@
if (/localstorage/i.test(params._scheme)) {
if (sub) {
subData = localStorage.getItem(sub + '@oauth3.org:issuer');
- onSuccess(subData || localStorage.getItem('oauth3.org:issuer'), subData && true);
- return;
}
- onSuccess(localStorage.getItem('oauth3.org:issuer'));
+ onSuccess(subData || localStorage.getItem('oauth3.org:issuer')
+ || window.location.href.replace(/\/\.well-known.*/, ''), subData && true);
return;
}