File tree Expand file tree Collapse file tree 2 files changed +3
-13
lines changed
Expand file tree Collapse file tree 2 files changed +3
-13
lines changed Original file line number Diff line number Diff line change @@ -18,7 +18,7 @@ export function AuthProviderOnboarding({
1818 return < AuthProvider { ...authConfig } > { children } </ AuthProvider > ;
1919}
2020
21- export function buildAuthProviderConfig ( oidcConfig : OIDCConfig ) {
21+ function buildAuthProviderConfig ( oidcConfig : OIDCConfig ) {
2222 const userStore = new WebStorageStateStore ( { store : window . localStorage } ) ;
2323
2424 const props : AuthProviderProps = {
Original file line number Diff line number Diff line change @@ -10,19 +10,7 @@ export enum Landscape {
1010 Local = 'LOCAL' ,
1111}
1212
13- export interface OIDCConfig {
14- clientId : string ;
15- issuerUrl : string ;
16- scopes : string [ ] ;
17- }
1813
19- type FrontendConfig = {
20- backendUrl : string ;
21- gatewayUrl : string ;
22- landscape ?: Landscape ;
23- documentationBaseUrl : string ;
24- oidcConfig : OIDCConfig ;
25- }
2614
2715interface FrontendConfigContextType extends FrontendConfig {
2816 links : DocLinkCreator ;
@@ -67,6 +55,7 @@ const OidcConfigSchema = z.object({
6755 issuerUrl : z . string ( ) ,
6856 scopes : z . array ( z . string ( ) ) ,
6957} ) ;
58+ export type OIDCConfig = z . infer < typeof OidcConfigSchema > ;
7059
7160const FrontendConfigSchema = z . object ( {
7261 backendUrl : z . string ( ) ,
@@ -75,6 +64,7 @@ const FrontendConfigSchema = z.object({
7564 oidcConfig : OidcConfigSchema ,
7665 landscape : z . optional ( z . nativeEnum ( Landscape ) ) ,
7766} ) ;
67+ type FrontendConfig = z . infer < typeof FrontendConfigSchema > ;
7868
7969function validateAndCastFrontendConfig ( config : unknown ) : FrontendConfig {
8070 try {
You can’t perform that action at this time.
0 commit comments