adding debug code

This commit is contained in:
2021-12-10 11:36:35 +00:00
parent b9f03cf207
commit 00e52a3127
4 changed files with 31 additions and 14 deletions
+22 -8
View File
@@ -117,6 +117,17 @@ 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=" +
process.env.NEXT_PUBLIC_GG_CLIENT_ID +
"&redirect_uri=" +
process.env.NEXT_PUBLIC_GG_REDIRECT_URI +
"&ui_locales=" +
(router.locale == "cy" ? "cy" : "en-GB")
);
// let spinnerState = () => {
// showSpinnerState == true
// ? setShowSpinnerState(false)
@@ -162,15 +173,18 @@ let Login = (props) => {
}, [cookies.pinsUser, router]);
const govGatwayLoginRedirect = () => {
router.replace(
let ggUrl =
props.govGateway.config.authorization_endpoint +
"?response_type=code&scope=openid&client_id=" +
process.env.NEXT_PUBLIC_GG_ClIENT_ID +
"&redirect_uri=" +
process.env.NEXT_PUBLIC_GG_REDIRECT_URI +
"&ui_locales=" +
(router.locale == "cy" ? "cy" : "en-GB")
);
"?response_type=code&scope=openid&client_id=" +
process.env.NEXT_PUBLIC_GG_CLIENT_ID +
"&redirect_uri=" +
process.env.NEXT_PUBLIC_GG_REDIRECT_URI +
"&ui_locales=" +
(router.locale == "cy" ? "cy" : "en-GB");
console.log("login Url:", ggUrl);
router.replace(ggUrl);
};
return (