From 8624d76b46bc4b889300e70da11362eaa5190d61 Mon Sep 17 00:00:00 2001 From: Shatrughn Gupta Date: Fri, 5 Jan 2018 21:17:36 +0530 Subject: [PATCH] fix: better way to get origin --- js/authenticator.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/authenticator.js b/js/authenticator.js index 0318866..f4a0969 100644 --- a/js/authenticator.js +++ b/js/authenticator.js @@ -103,7 +103,7 @@ const openAuthPopUp = (url) => { } let popUpResponded = false -const redirectUri = location.protocol + '//' + location.hostname + (location.port ? ':' + location.port : '') + '/redirect.html' +const redirectUri = location.origin + '/redirect.html' const authConfig = { response_type: 'code', redirect_uri: redirectUri