@cryptotaxi247 / netdata-1 / commits / 2b8bb23b9

changed naming for redirect_uri param (#6663)

* naming changes for redirect to the console after sign-in from nodes-view click: redirectUrl > redirect_uri in query params for cloud sign-in call redirectUrl > redirectUri in response object from iframe's window.parent.postMessage * redirectUri => redirectURI from cloud's `postMessage`

Jacek Kolasa committed Sep 17, 2019 at 11:18 UTC 2b8bb23b95efbff23abbd3fcc4b379c306da37d3
1 file changed +3 -3
web/gui/main.js
+3 -3
@@ -725,7 +725,7 @@ function openAuthenticatedUrl(url) {
725 if (isSignedIn()) {
726 window.open(url);
727 } else {
728 - window.open(`${NETDATA.registry.cloudBaseURL}/account/sign-in-agent?id=${NETDATA.registry.machine_guid}&name=${encodeURIComponent(NETDATA.registry.hostname)}&origin=${encodeURIComponent(window.location.origin + "/")}&redirectUrl=${encodeURIComponent(window.location.origin + "/" + url)}`);
728 + window.open(`${NETDATA.registry.cloudBaseURL}/account/sign-in-agent?id=${NETDATA.registry.machine_guid}&name=${encodeURIComponent(NETDATA.registry.hostname)}&origin=${encodeURIComponent(window.location.origin + "/")}&redirect_uri=${encodeURIComponent(window.location.origin + "/" + url)}`);
729 }
730 }
731
@@ -4955,8 +4955,8 @@ function handleSignInMessage(e) {
4955 cloudToken = e.data.token;
4956
4957 netdataRegistryCallback(registryAgents);
4958 - if (e.data.redirectUrl) {
4959 - window.location.replace(e.data.redirectUrl);
4958 + if (e.data.redirectURI) {
4959 + window.location.replace(e.data.redirectURI);
4960 }
4961 }
4962