-
Notifications
You must be signed in to change notification settings - Fork 16
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: updates for login_app type [LIBS-405] #831
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
tomzemp
changed the title
Libs 405/login app type updates
feat: updates for login_app type [LIBS-405]
Feb 16, 2024
2 tasks
Closed
kabaros
approved these changes
Mar 5, 2024
dhis2-bot
added a commit
that referenced
this pull request
Mar 5, 2024
# [10.6.0-alpha.1](v10.5.0...v10.6.0-alpha.1) (2024-03-05) ### Features * updates for login_app type [LIBS-405] ([#831](#831)) ([0cc2fbd](0cc2fbd))
🎉 This PR is included in version 10.6.0-alpha.1 🎉 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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR has changes necessary to build "public" login apps. A login app needs to not include the header bar (😅) but also needs to not rely on any requests to endpoints beyond the auth wall: hence the updates. See ticket https://dhis2.atlassian.net/jira/software/c/projects/LIBS/issues/LIBS-405
Note: The login endpoints are public, but currently do not support versions (e.g. api/loginConfig is public, api/41/loginConfig is not public). As a result, I've passed a boolean
skipApiVersion
to Provider in app-runtime (and have opened a PR: dhis2/app-runtime#1374). I'm putting this PR into draft until we determine if we really need to exclude the version or not.changes
Header Bar
removed for login_app
,
UI Language
This is set from the uiLocale at api/loginConfig (i.e. we use the system ui locale, and fall back to user's browser language) because we do not know the user's chosen uiLocale . The login app itself has logic to read persisted locale from localStorage, but I think that we don't want to incorporate that into the logic within app platform.
API Version
We need the api version (eventually for feature toggling). Currently api/loginConfig endpoint is publicly accessible by api/41/loginConfig is not currently accessible.
As mentioned above, the
Login Modal/Base URL
I'm not sure if we want to provide something similar to the LoginModal so that users can specify a base url? For now, I am just telling user that they should set DHIS2_BASE_URL (with environment variable).
Offline capabilities
As discussed in our FE call (21 Feb 2023), we don't need offline support for
login_app
s, so I've removed the PWALoadingBoundary and OfflineInterfaceProvider from app-adapter, but I'm not sure if it's sufficient to just pass anull
value forofflineInterface
down to app-runtime Provider (https://github.com/dhis2/app-runtime/blob/master/runtime/src/Provider.tsx#L21) or if we need to adapt app-runtime as well?