match exact hostname for same-origin discovery
This commit is contained in:
parent
5163463dd2
commit
9c093ca3a1
|
@ -800,7 +800,7 @@
|
||||||
opts = opts || {};
|
opts = opts || {};
|
||||||
providerUri = OAUTH3.url.normalize(providerUri);
|
providerUri = OAUTH3.url.normalize(providerUri);
|
||||||
|
|
||||||
if (providerUri.match(OAUTH3._browser.window.location.hostname)) {
|
if (OAUTH3.uri.normalize(providerUri).replace(/\/.*/, '') === OAUTH3.uri.normalize(OAUTH3._browser.window.location.hostname)) {
|
||||||
console.warn("It looks like you're a provider checking for your own directive,"
|
console.warn("It looks like you're a provider checking for your own directive,"
|
||||||
+ " so we we're just gonna use"
|
+ " so we we're just gonna use"
|
||||||
+ " OAUTH3.request({ method: 'GET', url: '.well-known/oauth3/directive.json' })");
|
+ " OAUTH3.request({ method: 'GET', url: '.well-known/oauth3/directive.json' })");
|
||||||
|
|
Loading…
Reference in New Issue