@c-rex/contexts 0.1.13 → 0.1.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/config-provider.tsx +15 -2
package/package.json
CHANGED
package/src/config-provider.tsx
CHANGED
|
@@ -85,7 +85,7 @@ export const AppConfigProvider = ({ children }: { children: React.ReactNode }) =
|
|
|
85
85
|
|
|
86
86
|
const requestToken = async (): Promise<void> => {
|
|
87
87
|
try {
|
|
88
|
-
const response = await fetch(
|
|
88
|
+
const response = await fetch('/api/oidc/token', {
|
|
89
89
|
method: 'POST',
|
|
90
90
|
credentials: 'include',
|
|
91
91
|
});
|
|
@@ -98,8 +98,20 @@ export const AppConfigProvider = ({ children }: { children: React.ReactNode }) =
|
|
|
98
98
|
level: "error",
|
|
99
99
|
message: `config-provider.requestToken error: ${error}`
|
|
100
100
|
});
|
|
101
|
+
}
|
|
102
|
+
}
|
|
101
103
|
|
|
102
|
-
|
|
104
|
+
const updateIssuerMetadata = async (): Promise<void> => {
|
|
105
|
+
try {
|
|
106
|
+
await fetch('/api/oidc/issuer', {
|
|
107
|
+
method: 'POST',
|
|
108
|
+
credentials: 'include',
|
|
109
|
+
});
|
|
110
|
+
} catch (error) {
|
|
111
|
+
call("CrexLogger.log", {
|
|
112
|
+
level: "error",
|
|
113
|
+
message: `config-provider.updateIssuerMetadata error: ${error}`
|
|
114
|
+
});
|
|
103
115
|
}
|
|
104
116
|
}
|
|
105
117
|
|
|
@@ -153,6 +165,7 @@ export const AppConfigProvider = ({ children }: { children: React.ReactNode }) =
|
|
|
153
165
|
manageUILanguage(configsResult)
|
|
154
166
|
manageContentLanguage(configsResult)
|
|
155
167
|
updateLanguages()
|
|
168
|
+
updateIssuerMetadata()
|
|
156
169
|
setError(null)
|
|
157
170
|
setConfigs(configsResult)
|
|
158
171
|
interval(1000 * 60 * 9);
|