From 2587d03860cfea66f7b88560e1cc2ea3deefd859 Mon Sep 17 00:00:00 2001 From: AJ ONeal Date: Tue, 28 Nov 2017 02:26:31 +0000 Subject: [PATCH] fix trailing slash --- oauth3.core.js | 2 +- well-known/oauth3/index.html | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/oauth3.core.js b/oauth3.core.js index d7e973c..e92af65 100644 --- a/oauth3.core.js +++ b/oauth3.core.js @@ -930,7 +930,7 @@ else { return OAUTH3.request({ method: 'GET' - , url: OAUTH3.url.normalize(providerUri) + opts._pathname // '/.well-known/oauth3/' + discoverFile + , url: OAUTH3.url.normalize(providerUri) + '/' + opts._pathname // '/.well-known/oauth3/' + discoverFile }).then(function (resp) { return resp.data; }); diff --git a/well-known/oauth3/index.html b/well-known/oauth3/index.html index d3540b4..cfb3bea 100644 --- a/well-known/oauth3/index.html +++ b/well-known/oauth3/index.html @@ -128,7 +128,7 @@ onError(err); } - OAUTH3.request({ url: 'directives.json' }).then(function (resp) { + OAUTH3.request({ url: params._pathname.replace(/^\.well-known\/oauth3\//, '') }).then(function (resp) { urlsafe64 = OAUTH3._base64.encodeUrlSafe(JSON.stringify(resp.data, null, 0)); onSuccess(urlsafe64);