Skip to content

Commit dc95e1c

Browse files
committed
chore: EID_WALLET_TOKEN .env variable
1 parent 157a685 commit dc95e1c

File tree

2 files changed

+6
-11
lines changed

2 files changed

+6
-11
lines changed

infrastructure/eid-wallet/src/env.d.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,5 @@ declare namespace App {}
55
declare module "$env/static/public" {
66
export const PUBLIC_REGISTRY_URL: string;
77
export const PUBLIC_PROVISIONER_URL: string;
8+
export const EID_WALLET_TOKEN: string;
89
}

infrastructure/eid-wallet/src/lib/global/controllers/evault.ts

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { PUBLIC_REGISTRY_URL, PUBLIC_PROVISIONER_URL } from "$env/static/public";
1+
import { PUBLIC_REGISTRY_URL, PUBLIC_PROVISIONER_URL, EID_WALLET_TOKEN } from "$env/static/public";
22
import type { Store } from "@tauri-apps/plugin-store";
33
import axios from "axios";
44
import { GraphQLClient } from "graphql-request";
@@ -140,16 +140,10 @@ export class VaultController {
140140
return;
141141
}
142142

143-
// Get authentication token from registry
144-
let authToken: string | null = null;
145-
try {
146-
const entropyResponse = await axios.get(
147-
new URL("/entropy", PUBLIC_REGISTRY_URL).toString()
148-
);
149-
authToken = entropyResponse.data?.token || null;
150-
} catch (error) {
151-
console.error("Failed to get auth token from registry:", error);
152-
// Continue without token - server will reject if auth is required
143+
// Get authentication token from environment variable
144+
const authToken = EID_WALLET_TOKEN || null;
145+
if (!authToken) {
146+
console.warn("EID_WALLET_TOKEN not set, request may fail authentication");
153147
}
154148

155149
// Call PATCH /public-key to save the public key

0 commit comments

Comments
 (0)