Compare commits

...
2 Commits
2 changed files with 7 additions and 3 deletions

No files matched your search

@@ -160,7 +160,7 @@ export const useNetBirdClient = () => {
}, []);
const connect = useCallback(
async (privateKey: string): Promise<boolean> => {
async (privateKey: string, deviceName?: string): Promise<boolean> => {
await initialize();
if (typeof (window as any).NetBirdClient !== "function") {
@@ -178,6 +178,10 @@ export const useNetBirdClient = () => {
privateKey,
logLevel: "info",
managementURL: config.apiOrigin,
// Report the name the peer was registered with, so its meta does not
// change on the first sync (a meta change pushes a network map to
// every peer in the account).
...(deviceName ? { deviceName } : {}),
});
await netBirdClient.current.start();
@@ -293,7 +297,7 @@ export const useNetBirdClient = () => {
},
`/${peerId}/temporary-access`,
);
return await connect(keyPairs.privateKey);
return await connect(keyPairs.privateKey, name);
} catch (error) {
netBirdStore.setState({ status: NetBirdStatus.DISCONNECTED });
throw error;
+1 -1
View File
@@ -82,7 +82,7 @@ const loadConfig = (): Config => {
googleTagManagerID: configJson?.googleTagManagerID || undefined,
authServiceUrl: configJson?.authServiceUrl ?? undefined,
wasmPath:
configJson?.wasmPath || "https://pkgs.netbird.io/wasm/client/v0.76.3",
configJson?.wasmPath || "https://pkgs.netbird.io/wasm/client/v0.78.0",
licensed: configJson?.licensed === "true",
cloud: configJson?.cloud === "true",
agentNetworkOnly: configJson?.agentNetworkOnly === "true",