This commit is contained in:
2025-07-18 11:42:06 +00:00
parent f530fa639a
commit 4ec2e46c4b
5 changed files with 70 additions and 23 deletions

View File

@@ -83,10 +83,13 @@ export class BunqSession {
* Register the device
*/
private async registerDevice(description: string, permittedIps: string[] = []): Promise<void> {
// If no IPs specified, allow all IPs with wildcard
const ips = permittedIps.length > 0 ? permittedIps : ['*'];
const response = await this.httpClient.post<IBunqDeviceServerResponse>('/v1/device-server', {
description,
secret: this.context.apiKey,
permitted_ips: permittedIps.length > 0 ? permittedIps : undefined
permitted_ips: ips
});
// Device is now registered