DefGuard / client

Best WireGuard desktop client with Multi-Factor Authentication
81 stars 9 forks source link

defguard client got 401 while adding a new device #69

Closed kchudy closed 7 months ago

kchudy commented 9 months ago

OS: macOS Arch: Intel

On mgryczka macOS client displayed an error after entering the enrollment token and device name. In the logs the client got 401 error.

[2023-11-24][09:20:27][INFO][defguard_client::database] Created app data dir at: /Users/mike/Library/Application Support/net.defguard [2023-11-24][09:20:27][INFO][defguard_client::database] Database file succesfully created at: /Users/mike/Library/Application Support/net.defguard/defguard.db [2023-11-24][09:20:27][INFO][defguard_client::database] Applied migrations. [2023-11-24][09:20:27][INFO][defguard_client] Database initialization completed [2023-11-24][09:20:27][INFO][defguard_client] Starting main app thread. [2023-11-24][09:20:27][INFO][defguard_client] Database info result: Ok( (), ) [2023-11-24][09:20:28][INFO][defguard_client::commands] Instances retrieved(0) [2023-11-24][09:23:36][INFO][defguard_client::commands] Instances retrieved(0) [2023-11-24][09:23:46][ERROR][Sv@tauri://localhost/assets/index-b8f9d85a.js:68:6414] Failed to create device check enrollment and defguard logs [2023-11-24][09:24:56][ERROR][Sv@tauri://localhost/assets/index-b8f9d85a.js:68:6414] {"error":"Unauthorized"} [2023-11-24][09:24:56][ERROR][Sv@tauri://localhost/assets/index-b8f9d85a.js:68:6414] 401 [2023-11-24][09:25:44][INFO][defguard_client::commands] Instances retrieved(0) [2023-11-24][09:25:51][ERROR][Sv@tauri://localhost/assets/index-b8f9d85a.js:68:6414] Failed to create device check enrollment and defguard logs [2023-11-24][09:27:13][INFO][defguard_client::commands] Instances retrieved(0) [2023-11-24][09:27:19][ERROR][Sv@tauri://localhost/assets/index-b8f9d85a.js:68:6414] Failed to create device check enrollment and defguard logs

kchudy commented 9 months ago

Error due to device name collision. Improve error handling. User should know he should use a different device name.

teon commented 9 months ago

Implement form validaton