We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3819c8e commit 200a977Copy full SHA for 200a977
web/src/contexts/AuthContext.tsx
@@ -36,8 +36,13 @@ export const AuthProvider: React.FC<{ children: React.ReactNode }> = ({ children
36
// Check token validity on mount and when token changes
37
useEffect(() => {
38
if (token) {
39
+ // Get the installation target from initial state
40
+ const initialState = window.__INITIAL_STATE__ || {};
41
+ const target = initialState.installTarget;
42
+
43
// Make a request to any authenticated endpoint to check token validity
- fetch("/api/linux/install/installation/config", {
44
+ // Use the correct target-specific endpoint based on installation target
45
+ fetch(`/api/${target}/install/installation/config`, {
46
headers: {
47
Authorization: `Bearer ${token}`,
48
},
0 commit comments