adding in gg endpoints and basic methods
This commit is contained in:
@@ -161,6 +161,14 @@ let Login = (props) => {
|
||||
: "";
|
||||
}, [cookies.pinsUser, router]);
|
||||
|
||||
const govGatwayLoginRedirect = () => {
|
||||
router.replace(
|
||||
props.govGateway.config.authorization_endpoint +
|
||||
"?response_type=code&scope=openid&client_id=5vTukeSpN7d6uBV7YLb7A5wOctzzkZ&redirect_uri=https://pp-planningcasework.service.gov.wales&ui_locales=" +
|
||||
(router.locale == "cy" ? "cy" : "en-GB")
|
||||
);
|
||||
};
|
||||
|
||||
return (
|
||||
<div className="card" id="login-card">
|
||||
<form onSubmit={handleSubmit(onHandleSubmit)}>
|
||||
@@ -247,6 +255,17 @@ let Login = (props) => {
|
||||
</a>
|
||||
</Link>
|
||||
</p>
|
||||
|
||||
<p className="govuk-body-s">
|
||||
<a
|
||||
onClick={() => {
|
||||
govGatwayLoginRedirect();
|
||||
}}
|
||||
className="govuk-link--no-underline"
|
||||
>
|
||||
Log in using Government Gateway
|
||||
</a>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
@@ -271,6 +290,7 @@ const mapStateToProps = (state) => {
|
||||
watchedCases: state.watchedCases,
|
||||
myRepresentations: state.myRepresentations,
|
||||
awaitingSubmission: state.awaitingSubmission,
|
||||
govGateway: state.govGateway,
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user