diff --git a/actions/azurestorage.js b/actions/azurestorage.js
index b61a0e52..4d76004d 100644
--- a/actions/azurestorage.js
+++ b/actions/azurestorage.js
@@ -40,7 +40,11 @@ export const createContainer = async (containerName) => {
// console.log(`- ${container.name}`);
// }
- console.log("\n//////////////////\n container name :", containerName);
+ console.log(
+ "\n//////////////////\n container name :",
+ containerName,
+ "\n//////////////////\n"
+ );
return containerName;
};
@@ -271,7 +275,9 @@ export const downloadAllProgressFiles = async (
progressBlobObj
) => {
console.log(
- "/////////////////////////\n downloading files: " + progressBlobObj
+ "/////////////////////////\n downloading files: " +
+ progressBlobObj +
+ "\n/////////////////////////\n"
);
const creds = new DefaultAzureCredential();
@@ -495,7 +501,7 @@ export const getAllProgressBlobs = async (containerName) => {
});
}
- console.log("blobObj:", blobObj);
+ //console.log("blobObj:", blobObj);
return blobObj;
};
diff --git a/actions/govgateway.js b/actions/govgateway.js
index 0b6e2061..59f35458 100644
--- a/actions/govgateway.js
+++ b/actions/govgateway.js
@@ -31,37 +31,6 @@ export const getProviderConfig = () => {
});
};
-export const getGGToken = (tokenURL, authCode, redirectUri) => {
- const tokenBody =
- "grant_type=authorization_code" +
- "&code=" +
- authCode +
- "&redirect_uri=" +
- redirectUri;
-
- const basicAuthBase64 = (ggClientID + ":" + ggClientSecret).toString();
- //console.log("base64 " + Base64.encode(basicAuthBase64));
-
- const tokenConfig = {
- headers: {
- "Content-Type": "application/x-www-form-urlencoded",
- "Authorization": "Basic " + Base64.encode(basicAuthBase64),
- },
- };
-
- return axios
- .post(tokenURL, tokenBody, tokenConfig)
- .then((res) => res.data)
- .catch((error) => {
- // if (error.response) {
- // console.log(error.response.data);
- // console.log(error.response.status);
- // console.log(error.response.headers);
- // }
- return error.response;
- });
-};
-
export const getUserInfo = (userInfoURL, authToken) => {
const tokenConfig = {
headers: {
@@ -78,21 +47,6 @@ export const getUserInfo = (userInfoURL, authToken) => {
});
};
-export const getPortalLogin = (emailAddress, token) => {
- var queryUrl =
- "contacts?$filter=emailaddress1 eq '" +
- emailAddress +
- "'&$count=true&$select=emailaddress1,contactid,pinswg_custom_password,yomifullname,firstname,lastname";
- return axios
- .get(WEBAPI_URL + queryUrl + hashAPIPath(queryUrl), azureHeaders(token))
- .then((res) => res.data)
- .catch((error) => {
- console.log(consoleLogger(error));
- //console.log("thiserror", error);
- return JSON.stringify(error);
- });
-};
-
var Base64 = {
_keyStr:
"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",
diff --git a/actions/index.js b/actions/index.js
index 74bb1ba7..47689368 100644
--- a/actions/index.js
+++ b/actions/index.js
@@ -761,7 +761,8 @@ export const getAwaitingSubmission = (loggedInUserId) => {
export const getAwaitingSubmissionFromBlob = (containerName) => {
console.log(
"///////////////////////\ngetAwaitingSubmissionFromBlob: " +
- containerName
+ containerName +
+ "\n///////////////////////\n"
);
return axios
.get(
@@ -1400,3 +1401,17 @@ export const getNotice = () => {
console.log("this serror", error);
});
};
+
+export const getPortalLogin = (emailAddress) => {
+ var queryUrl =
+ "/api/endpoint/getportallogin_api?emailAddress=" + emailAddress;
+
+ return axios
+ .get(BASE_URL + queryUrl)
+ .then((res) => res.data)
+ .catch((error) => {
+ //console.log(consoleLogger(error));
+ console.log("thiserror", error);
+ return JSON.stringify(error);
+ });
+};
diff --git a/components/homepage/login.js b/components/homepage/login.js
index 53542a2c..b0741693 100644
--- a/components/homepage/login.js
+++ b/components/homepage/login.js
@@ -117,15 +117,8 @@ const RenderPasswordfield = ({
let Login = (props) => {
let { t } = useTranslation();
- const {
- handleSubmit,
- pristine,
- reset,
- submitting,
- setLoggedInUserId,
- GG_CLIENT_ID,
- GG_REDIRECT_URI,
- } = props;
+ const { handleSubmit, pristine, reset, submitting, setLoggedInUserId } =
+ props;
const { data: session } = useSession();
@@ -135,17 +128,6 @@ let Login = (props) => {
// const [showSpinnerState, setShowSpinnerState] = useState(false);
const [validLoginID, setValidLoginID] = useState(null);
- // console.log(
- // "built login url path:",
- // props.govGateway.config.authorization_endpoint +
- // "?response_type=code&scope=openid&client_id=" +
- // GG_CLIENT_ID +
- // "&redirect_uri=" +
- // GG_REDIRECT_URI +
- // "&ui_locales=" +
- // (router.locale == "cy" ? "cy" : "en-GB")
- // );
-
// let spinnerState = () => {
// showSpinnerState == true
// ? setShowSpinnerState(false)
@@ -412,7 +394,6 @@ const mapStateToProps = (state) => {
watchedCases: state.watchedCases,
myRepresentations: state.myRepresentations,
awaitingSubmission: state.awaitingSubmission,
- govGateway: state.govGateway,
};
};
diff --git a/components/main.js b/components/main.js
index 11af2de7..deefa314 100644
--- a/components/main.js
+++ b/components/main.js
@@ -12,7 +12,7 @@ import Dns from "./homepage/dns";
const MainHome = (props) => {
let { t } = useTranslation();
- const { showLogin, GG_REDIRECT_URI, GG_CLIENT_ID, session } = props;
+ const { showLogin, session } = props;
const router = useRouter();
const { locale } = router;
@@ -34,11 +34,7 @@ const MainHome = (props) => {
{showLogin == "true" && (
<>