Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add redirect to safe login mode for login apps #835

Merged
merged 2 commits into from
Mar 20, 2024

Conversation

tomzemp
Copy link
Member

@tomzemp tomzemp commented Mar 15, 2024

Adds login-app-specific error boundary that shows button to redirect to "safe" login page:

image

@tomzemp tomzemp requested a review from kabaros March 18, 2024 12:35
@@ -61,8 +61,14 @@ export class ErrorBoundary extends Component {
})
}

handleSafeLoginRedirect = () => {
window.location.href =
this.props.url + '/dhis-web-commons/security/login.action'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this prop would be btter named baseUrl? and maybe be more defensive with the url construction here, in case the base URL has a trailing slash, to avoid a double slash

@tomzemp tomzemp merged commit ba26ada into alpha Mar 20, 2024
6 checks passed
@tomzemp tomzemp deleted the login-error-boundary branch March 20, 2024 15:08
dhis2-bot added a commit that referenced this pull request Mar 20, 2024
# [10.6.0-alpha.2](v10.6.0-alpha.1...v10.6.0-alpha.2) (2024-03-20)

### Features

* add redirect to safe login mode for login apps ([#835](#835)) ([ba26ada](ba26ada))
@dhis2-bot
Copy link
Contributor

🎉 This PR is included in version 10.6.0-alpha.2 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

None yet

3 participants