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鈥檒l 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 13 commits into from
Mar 5, 2024

Conversation

tomzemp
Copy link
Member

@tomzemp tomzemp commented Feb 16, 2024

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_apps, so I've removed the PWALoadingBoundary and OfflineInterfaceProvider from app-adapter, but I'm not sure if it's sufficient to just pass a null value for offlineInterface 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?

@tomzemp tomzemp requested a review from a team February 16, 2024 13:30
@tomzemp tomzemp changed the title Libs 405/login app type updates feat: updates for login_app type [LIBS-405] Feb 16, 2024
@tomzemp tomzemp marked this pull request as draft February 20, 2024 12:39
@tomzemp tomzemp mentioned this pull request Mar 1, 2024
@tomzemp tomzemp changed the base branch from master to alpha March 1, 2024 16:08
@tomzemp tomzemp marked this pull request as ready for review March 1, 2024 16:08
@tomzemp tomzemp merged commit 0cc2fbd into alpha Mar 5, 2024
6 checks passed
@tomzemp tomzemp deleted the LIBS-405/login_app_type_updates branch March 5, 2024 14:28
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))
@dhis2-bot
Copy link
Contributor

馃帀 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
Development

Successfully merging this pull request may close these issues.

None yet

3 participants