Skip to content

Commit

Permalink
DRYD-1417: Go to UI authorize page after password reset success. (#213)
Browse files Browse the repository at this point in the history
  • Loading branch information
ray-lee authored May 10, 2024
1 parent cfcc63c commit f07969b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/components/pages/service/PasswordResetPage.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -90,19 +90,23 @@ const propTypes = {
csrf: PropTypes.object,
intl: intlShape.isRequired,
tenantId: PropTypes.string,
tenantLoginUrl: PropTypes.string,
token: PropTypes.string.isRequired,
};

const defaultProps = {
csrf: null,
tenantId: null,
// If we don't receive a tenant-specific login URL, default to the services login page.
tenantLoginUrl: '/cspace-services/login',
};

function PasswordResetPage(props) {
const {
csrf,
intl,
tenantId,
tenantLoginUrl,
token,
} = props;

Expand Down Expand Up @@ -175,7 +179,7 @@ function PasswordResetPage(props) {
setError(null);

const loginLink = (
<a href="../login">
<a href={tenantLoginUrl}>
<FormattedMessage {...messages.loginLink} />
</a>
);
Expand Down
2 changes: 2 additions & 0 deletions src/service.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ export default (uiConfig) => {
messages,
sso,
tenantId,
tenantLoginUrl,
token,
} = config;

Expand Down Expand Up @@ -116,6 +117,7 @@ export default (uiConfig) => {
<PasswordResetPage
csrf={csrf}
tenantId={tenantId}
tenantLoginUrl={tenantLoginUrl}
token={token}
/>
)}
Expand Down

0 comments on commit f07969b

Please sign in to comment.