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 UniLogin configuration query and update related services #48

Conversation

ThomasGross
Copy link
Contributor

Link to issue

https://reload.atlassian.net/browse/DDFBRA-97

Description

Add UniLogin configuration query and update related services

@ThomasGross ThomasGross requested a review from spaceo November 15, 2024 13:15
@spaceo spaceo force-pushed the DDFBRA-97-frontend-hent-konfig-objekt-fra-backend-og-persister-i-applikationen branch from e0fa340 to f325e5b Compare November 21, 2024 22:22
By adding some extra typescript magic
@spaceo spaceo force-pushed the DDFBRA-97-frontend-hent-konfig-objekt-fra-backend-og-persister-i-applikationen branch from f325e5b to 2f75108 Compare November 21, 2024 22:26
Since Nextjs is a tricky beast and handles env variables differently
dependeing of the use of "NEXT_PUBLIC_" and a wish to be clear of what
is only available server side we introduce a "server-only." prefix in
the configuration key notation.

Furthermore a useGoConfig is introduced for loading config client side.
It wont be abe to load the "server-only" configuration.
Only load stuff when requested...
Since everything has been moved to config resolvers they are not needed
anymore
We do not want to fetch when resolver code is evaluated.
For some reasons options where not added in dpl-cms fetcher.
@spaceo spaceo force-pushed the DDFBRA-97-frontend-hent-konfig-objekt-fra-backend-og-persister-i-applikationen branch from 5a25789 to 1fd4647 Compare November 24, 2024 18:44
It is easier to handle just one goConfig function both server and client
side.
Also added 5 min cache of dpl cms config fetching.
Copy link
Contributor

@spaceo spaceo left a comment

Choose a reason for hiding this comment

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

LGTM 👍

@spaceo spaceo merged commit b6672e3 into main Nov 25, 2024
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants