adding debug code
This commit is contained in:
@@ -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 (
|
||||
|
||||
Reference in New Issue
Block a user